How to know the size of the maximized form?

candice

Active member
Joined
Jan 23, 2007
Messages
30
Programming Experience
Beginner
Hello guys,
I wonder whether there is a way to know the full size of the form in pixel, so that I can manage to put controls or similar things on form using the x-y coordinates reasonably.
And also is the maximaized size of the form changes from different sizes of monitor? If so, is there a way to fix the full size of the form? say, (200,150)will be the bottom right coordinate of the form, no matter what size the screen is.
Thanks in advance!!!:rolleyes:
 
Hello guys,
I wonder whether there is a way to know the full size of the form in pixel, so that I can manage to put controls or similar things on form using the x-y coordinates reasonably.
Since you are concerned about the placement of controls, you should be interested in finding the dimensions of the form that you can work with. Form.ClientSize is the size of the client area (or the form minus the borders and title bar).
And also is the maximaized size of the form changes from different sizes of monitor? If so, is there a way to fix the full size of the form? say, (200,150) will be the bottom right coordinate of the form, no matter what size the screen is.
Thanks in advance!!!:rolleyes:
Yes the maximized size of the form will vary and is directly proportional to the resolution (not size really) of the users monitor.

To change the maximized size of the form, if possible, would require the use of APIs. Actually, I know it's possible because there are programs that do just that.
You can alternately:
-- disable the Maximize button (set the Form's MaximizeBox property to false, this causes the button to be disabled) and set the MaximumSize property to 200,150.
-- set the Form's FormBorderStyle property to FixedDialog along with disabling the maximize button.
There are lot's of choices depending on the application.
 
Back
Top