
Form size changes in runtime vs design time modes
Hi Kevin,
Sorry for my late response.
The problem is caused by the following statement:
Me.StartPosition =
System.Windows.Forms.FormStartPosition.WindowsDefaultBounds
According to MSDN:
===
WindowsDefaultBounds - The form is positioned at the Windows default
location and has the bounds determined by Windows default.
So you are seeing by-design behavior. To fix the problem, you can change it
according to the options available to you:
CenterParent - The form is centered within the bounds of its parent form.
CenterScreen - The form is centered on the current display, and has the
dimensions specified in the form's size.
Manual - The location and size of the form will determine its starting
position.
WindowsDefaultBounds - The form is positioned at the Windows default
location and has the bounds determined by Windows default.
WindowsDefaultLocation - The form is positioned at the Windows default
location and has the dimensions specified in the form's size.
I think both Manual and WindowsDefaultLocation will work for you.
HTH.
Regards,
Yan Liu
This posting is provided "AS IS" with no warranties, and confers no rights.