Screen font size - user set ?

T

TOM

I have an application that does not behave too well when the user
changes the

Display Properties -> Appearance -> FontSize

after clicking Display from the Control Panel

to "Large Fonts" or "Extra Large Fonts"
(WinXP defaults to "Normal").

Two questions:

1) In C++.NET (V1.1) -- what is the name of the property that defines
how the user has set the default screen fonts? (I've searched, but there's a
zillion hits on
"font" in the documentation, and I can't seem to find the magic words to
narrow
the search).

2) My popup windows are defined using the VS designer. I think the designer
just
sets the font size property to a numeric value. Is there a way to automate
how these menus
adapt to the user's default font changes without actually hand-coding every
single label, button,
and text item in every single menu, popup, and window? Many of the images
when in "Large Font"
mode, get misaligned.

-- Tom
 
G

Guest

I have an application that does not behave too well when the user
changes the

Display Properties -> Appearance -> FontSize

after clicking Display from the Control Panel

to "Large Fonts" or "Extra Large Fonts"
(WinXP defaults to "Normal").

Two questions:

1) In C++.NET (V1.1) -- what is the name of the property that defines
how the user has set the default screen fonts? (I've searched, but there's a
zillion hits on
"font" in the documentation, and I can't seem to find the magic words to
narrow
the search).

2) My popup windows are defined using the VS designer. I think the designer
just
sets the font size property to a numeric value. Is there a way to automate
how these menus
adapt to the user's default font changes without actually hand-coding every
single label, button,
and text item in every single menu, popup, and window? Many of the images
when in "Large Font"
mode, get misaligned.

-- Tom

I have the luxury of developing for a controlled user environment, so I'm
not entirely familiar with having to deal with changeable display
resolutions, but I think the magic words you're looking for are "automatic
scaling". Specifically, the following items might be what you need.

In the "System::Windows::Forms" namespace:
Form::AutoScaleBaseSize (.NET 1.1 only, marked obsolete in 2.0)
Form::ApplyAutoScaling (.NET 1.1 only, marked obsolete in 2.0)
ContainerControl::AutoScaleDimensions (.NET 2.0 only)
ContainerControl::AutoScaleMode (.NET 2.0 only)

For more info on how to use these, see:

http://msdn2.microsoft.com/en-us/library/ms229605(VS.80).aspx

Hope this helps,
Sean
 
T

TOM

Thanks for the pointers. It at least got me in the right area of the
documentation.

My dialog menus have the fonts "Verdana" set for fixed size (9.75 points)
with
autoscale = off. Everything works correctly on my computer at different
screen resulutions and different System Font Size set from the control
panel. That is,
the dialog boxes stay the same regardless of settings (my desired intent).

But one of the users has dialog boxes that have a different font and
different size!
So I'm puzzled how my application can have different dialog box fonts and
size
on his system.

-- Tom
 
G

Guest

There are actually 2 places in the Display part of the Control Panel that
affect the relative size of dialog boxes. One is the Font Size option on the
Appearance tab. This will change the font size relative to the size of other
dialog box elements. I don't think it changes much else.

The other option is the DPI setting, reached by clicking the Settings tab
and then the Advanced button. It is normally set to 96 DPI, but it can be set
to 120 DPI or a custom size. As best I can tell, this changes the size of
dialog box elements that are measured in dialog units (controls, mostly) but
NOT those elements measured in pixels (such as images).

The only reason I know some of this is when I first received my notebook at
work, it had a 1440 x 900 resolution display with the 120-DPI option set.
This caused almost all my applications to have misaligned dialog box elements
until I changed the DPI setting back to its normal 96 DPI.

Sean
 
T

Tom

Thanks, Sean.

Yes - the user had changed the DPI setting. I tried that change on my
system, and also
setting my system to his display size, but still cannot reproduce the
problems on my system.
My dialog boxes still line up correctly over all the display ranges and DPI
settings, but he
has screenshots of the dialog boxes misaligning. Pretty tough to debug ...

-- Tom
 

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