4

I have a windows forms app built with .NET 3.5 and a relatively old version of Infragistics controls. It turns out some of the forms/controls look quite poor when viewed in Windows7 and Medium or Large Fonts. What are my options to resolve this? I have some tens of forms and would like a short-term solution rather than a rewrite, as the app will be migrated to WPF or Silverlight in the medium term.

Is there a switch I can 'turn off' medium/large fonts for the app as an immediate fix?

What general principles need to be followed for winforms apps to render nicely with medium/large fonts turned on?

Rory
  • 40,559
  • 52
  • 175
  • 261

2 Answers2

3

So far the main things I've found I needed to do are:

  • Change forms/controls so AutoScaleMode is set to Font

  • Change any forms with programmatic resizing so they're dependent on other controls' size or position, rather than hard-coded numbers that are right if fonts are set to normal size.

Other than that things mostly work as desired. Mostly. Still the odd odd thing to track down.

Rory
  • 40,559
  • 52
  • 175
  • 261
  • If you change the form's `AutoScaleMode` to "Font", any controls it contains should automatically inherit the value of that property. This is the best answer I could have given to your question without knowing what other problems you're experiencing. – Cody Gray - on strike Nov 22 '10 at 04:30
0

+1 on the AutoScaleMode suggestion.

I redesigned all the forms into TableLayoutPanels (it took ages) and got set all my Labels to AutoResize = True. TableLayouts take most of the pain away. Scaling and alignment are a breeze, although they are quite slow compared to say WPF.

Tom
  • 3,354
  • 1
  • 22
  • 25