By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,558 Members | 1,699 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,558 IT Pros & Developers. It's quick & easy.

AutoScale Doesn't Behave How I Expect/Hope

P: n/a
I have just been playing with AutoScale and I am unhappy with the way it
appears to work.

I have a form created on a desktop m/c where the screen font is Normal (96
dpi). The form looks fine at design time and runtime. I run the application
on my laptop, where the screen font is set to 120 dpi (125%), and the form
does not look fine. The line height of a listbox on the form is too small,
labels are truncated, and things generally look cramped. AutoScale is set to
True.

I notice that when I open the designer on the desktop, the AutoScaleBaseSize
is (5, 13). When I open the designer on the laptop it is also (5,13). If I
then change the AutoScale property in the properties window and look again
at AutoScaleBaseSize, it has changed to (6,15). Now when I run the
application on the laptop all is well. Well, almost. I should point out that
user controls on the form still do not scale correctly, and since they do
not have an AutoScale property, all I can think of doing is calling the
Scale() method with a parameter of 1.25. The problem with this approach is
that I would have to do this for every user control, and there are a lot of
them. It doesn't seem right that I have to add special code to all my user
controls to get them to scale properly. Furthermore, I haven't discovered
(yet) how to determine the correct scale factor at runtime.

I thought that the point of the AutoScale property was that a form would
display correctly on m/cs with different display settings, without having to
rebuild on that m/c. It doesn't look like that is what really happens.

Have I missed out a step here? Does anyone know the correct procedure for
making this work?

TIA

Charles
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Does anyone have any thoughts on why AutoScale doesn't work?

Charles
"Charles Law" <bl***@nowhere.com> wrote in message
news:eo**************@TK2MSFTNGP10.phx.gbl...
I have just been playing with AutoScale and I am unhappy with the way it
appears to work.

I have a form created on a desktop m/c where the screen font is Normal (96
dpi). The form looks fine at design time and runtime. I run the
application on my laptop, where the screen font is set to 120 dpi (125%),
and the form does not look fine. The line height of a listbox on the form
is too small, labels are truncated, and things generally look cramped.
AutoScale is set to True.

I notice that when I open the designer on the desktop, the
AutoScaleBaseSize is (5, 13). When I open the designer on the laptop it is
also (5,13). If I then change the AutoScale property in the properties
window and look again at AutoScaleBaseSize, it has changed to (6,15). Now
when I run the application on the laptop all is well. Well, almost. I
should point out that user controls on the form still do not scale
correctly, and since they do not have an AutoScale property, all I can
think of doing is calling the Scale() method with a parameter of 1.25. The
problem with this approach is that I would have to do this for every user
control, and there are a lot of them. It doesn't seem right that I have to
add special code to all my user controls to get them to scale properly.
Furthermore, I haven't discovered (yet) how to determine the correct scale
factor at runtime.

I thought that the point of the AutoScale property was that a form would
display correctly on m/cs with different display settings, without having
to rebuild on that m/c. It doesn't look like that is what really happens.

Have I missed out a step here? Does anyone know the correct procedure for
making this work?

TIA

Charles

Nov 21 '05 #2

P: n/a
"Charles Law" <bl***@nowhere.com> schrieb
Does anyone have any thoughts on why AutoScale doesn't work?


I don't have a solution, but maybe the people @
microsoft.public.dotnet.framework.windowsforms have.

Armin

Nov 21 '05 #3

P: n/a
Hi Armin

Thanks. I will give it a try.

Charles
"Armin Zingler" <az*******@freenet.de> wrote in message
news:uq**************@tk2msftngp13.phx.gbl...
"Charles Law" <bl***@nowhere.com> schrieb
Does anyone have any thoughts on why AutoScale doesn't work?


I don't have a solution, but maybe the people @
microsoft.public.dotnet.framework.windowsforms have.

Armin

Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.