vb.net form size at VS2015

WONG Tony 161 Reputation points
2021-08-09T08:40:47.423+00:00

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

then it changed to 1920, 1028 automatically

is 1028 maximum height? Thanks.

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,857 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,606 questions
{count} votes

Accepted answer
  1. Daniel Zhang-MSFT 9,621 Reputation points
    2021-08-10T01:18:49.463+00:00

    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.


0 additional answers

Sort by: Most helpful