How to program for Large Fonts on Vista?

F

Frank Rizzo

Winforms applications look allright on Windows XP when you turn on Extra
Large Fonts. In Vista, if you turn on Extra Large fonts, winform
applications look cartoony as if they've been stretched. In you check
'Use Windows XP scaling' in the Font Size dialog, winform applications
go back to looking normal, but anything that has been explicitly set to
be at pixel position, x, y is off. For instance, any dialog boxes that
resize themselves based on the context are typically off.

Another problem is that when I code a form and place controls in various
places in VS2005, they end up overlapping (when run on WindowsXP with
normal font size).

Is there a guide to programming WinForms while being aware of font size
settings? I can't seem to find anything on google.

Thanks.
 
P

Peter Duniho

[...]
Is there a guide to programming WinForms while being aware of font size
settings? I can't seem to find anything on google.

This will sound counter-intuitive (and it is :) ), but have you tried
setting the auto-scale mode for your form to "Dpi" instead of "Font"?

I don't know the answer for sure, since I've barely used Vista myself.
But I think that might be the setting you're looking for.

Pete
 
C

Chris Nahr

Is there a guide to programming WinForms while being aware of font size
settings? I can't seem to find anything on google.

Don't use WinForms auto-scaling. Don't use the Visual Studio designer
for WinForms controls. Create them manually and scale all coordinates
by the size of the current System.Drawing.SystemFonts.MessageBoxFont
(use the Height property). That's the only way known to work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top