Re: Windows Forms: Control.Scale(SizeF) does not work?
- From: "Christopher Fairbairn [MVP]" <christopher@xxxxxxxxxxxxxx>
- Date: Mon, 18 Aug 2008 11:44:24 +1200
Hi,
"WernerG" <WernerG@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:FB057242-8514-4180-918A-975288C338B7@xxxxxxxxxxxxxxxx
I debugged the program and Control.Size does not change after I do a
Control.Scale on it. No child controls are scaled either.
The automatic scaling feature is not as useful as it first looks. After
initial form layout (within InitializeComponent) the AutoScaleDimensions
property of your form will be reset to match the current screen resolution.
This means that calls to Control.Scale etc will return what ever value you
provide them since they think a 1 to 1 mapping is required.
For a description of the autoscaling process refer to the "Automatic Scaling
in Windows Forms" article available on MSDN at
http://msdn.microsoft.com/en-us/library/ms229605.aspx (in particular check
step number 3 within the "Automatic Scaling in Action" section).
Hope this helps,
Christopher Fairbairn
.
- Follow-Ups:
- Re: Windows Forms: Control.Scale(SizeF) does not work?
- From: WernerG
- Re: Windows Forms: Control.Scale(SizeF) does not work?
- References:
- Windows Forms: Control.Scale(SizeF) does not work?
- From: WernerG
- Windows Forms: Control.Scale(SizeF) does not work?
- Prev by Date: Re: Best strategy to solve performance issues ??
- Next by Date: Re: Serial port is closed when Power button is pressed
- Previous by thread: Windows Forms: Control.Scale(SizeF) does not work?
- Next by thread: Re: Windows Forms: Control.Scale(SizeF) does not work?
- Index(es):
Loading