Monthly Archives: December 2008

An easy stack layout panel for WinForms

This is a simple, but useful tip. Users of WPF are spoiled. They have all sorts of layout options. Those of us still working in WinForms have FlowLayoutPanel and TableLayoutPanel. That’s it. WPF has those and more.

For my current project, I needed a panel to layout controls vertically. The TableLayoutPanel can be awkward to work with, at least for what I need it to. At first glance, the FlowLayoutPanel looks it won’t work, since it produces something like this:

FlowLayoutTable_1

That’s with changing the FlowDirection to TopDown and putting AutoScroll to true.

But what I want is this:

image

To achieve this layout, merely set all the following properties on a FlowLayoutPanel:

  • AutoScroll = True
  • FlowDirection = TopDown
  • WrapContents = False

et voilà, Instant stack panel.


Check out my latest book, the essential, in-depth guide to performance for all .NET developers:

Writing High-Performance.NET Code, 2nd Edition by Ben Watson. Available for pre-order:

Malware Detection in Live Search and Webmaster Tools

Live Search has recently released some great new features that I want to highlight. The first is from the Webmaster center, which is the team I was hired on.

With the new Webmaster Tools, you can now see which pages on your site are infected with malware (aka drive-by downloads). The links are clearly highlighted and disabled so that you won’t accidentally click on them.

webmaster_crawl_issues

Not only that, but you can also see what pages that your site links to are infected with malware. This is great if your site allows any user-generated content and it’s possible that some link spam has made it on.

webmaster_outbound_links

In addition to these improvements in Webmaster Tools, the general Live Search engine is using the same malware detection to notify users of bad pages in the general search results. To see this, click on the link as if to visit it and you’ll get a pop-up instead.

livesearch_malware

If you run your own site, get signed up in Webmaster Tools and make sure you’re not contributing to the malware problem. If you do find that your site has malware on it, once you’ve removed it you can request that your site be reanalyzed.

For more info, check out these other blogs and articles:


Check out my latest book, the essential, in-depth guide to performance for all .NET developers:

Writing High-Performance.NET Code, 2nd Edition by Ben Watson. Available for pre-order: