question

WONGTony-4228 avatar image
0 Votes"
WONGTony-4228 asked WONGTony-4228 commented

vb.net form size at VS2015

When i tried to create a form size at 1920 x 1080

then it changed to 1920, 1028 automatically

is 1028 maximum height? Thanks.

dotnet-visual-basicwindows-forms
· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I can set any size with

 Me.Size = New Size(1920, 1080)

(or without style and maximized if I want to cover the Taskbar)


0 Votes 0 ·

Select the form and enter the values manually to Size property in Properties Window,


0 Votes 0 ·

Can i change to larger monitor for bigger form size?

my development monitor is 1024,
my production monitor is 1080

0 Votes 0 ·

Hi @WONGTony-4228,
The maximum size I obtained through the above code is 1940/1100. I did a test to show that my form can be set to 1940/1100 in a larger size, so it is ok.
Best Regards,
Daniel Zhang

0 Votes 0 ·

Hi @WONGTony-4228,
I have not heard from you for a couple of days. Please let me know if there is anything that I can help here.
Best Regards,
Daniel Zhang

0 Votes 0 ·

1 Answer

DanielZhang-MSFT avatar image
0 Votes"
DanielZhang-MSFT answered WONGTony-4228 commented

Hi WONGTony-4228,
The Form class limits the size of the form to no larger than the screen size. It is done in the SetBondsCore overlay of the Form and cannot be changed.
In other words, it is limited by the size in SystemInformation.MaxWindowTrackSize. The value returned by MaxWindowTrackSize refers to the size of the entire desktop, and the user cannot drag the window frame to a size larger than these sizes.
You can set the MaximumSize of the Form to be smaller, but not larger than MaxWindowTrackSize.

   Dim w = SystemInformation.MaxWindowTrackSize.Width
   Dim h = SystemInformation.MaxWindowTrackSize.Height

Best Regards,
Daniel Zhang


If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks a lot.

0 Votes 0 ·