Question Change autoscalemode - runtime & design time form size no longer agree

Ratel

New member
Joined
Aug 16, 2011
Messages
2
Location
Melbourne Australia
Programming Experience
3-5
Hi,


Environment
Windows 10, Visual Studio Express 2013, Screen Resolution 1920 x 1080, Text Size 100%



a) I created a simple Winform using the following default values:
Name : Form1
AutoScaleMode : Font
Size: 300,300

b) I added this line to the load event
MsgBox("Height=" & Me.Height & " Width=" & Me.Width & " Scale Factor" & Me.AutoScaleFactor.ToString())

c) I ran the program and it correctly displayed
Height=300 Width= 300 Scale Factor (Width=1, Height=1)

d) I change the AutoScaleMode to DPI
The following values are now displayed
Height=202 Width= 201 Scale Factor (Width=1, Height=1)

e) I change the AutoScaleMode back to Font
The following values are now displayed
Height=198 Width= 201 Scale Factor (Width=1, Height=1)
In the screen design the property size remains at 300 by 300

My questions are:
1) Why has the Height & Width not reverted back to 300 by 300
2) How can I bring the runtime & screen design values back in sync
 
Back
Top