Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Constant Window/Form Size independent of screen settings

Status
Not open for further replies.

ambra19

Programmer
Aug 5, 2002
32
0
0
CA
How can I adjust the window (MDI form?) that opens up to be a certain size (not adjustable)?
How can i make this independant of display setting as some users will have 1024 X 768 and others will have settings that are higher?
Any help is appreciated.
Regards,
ambra19
 

In the properties window change the borderstyle to any of the fixed settings (note: if you do pick one of these you may want to reset the showintaskbar back to true (usually set to false automatically when these are choosen)).

Good Luck

 
You can use the Height and Width properties on the Screen object to get the screen dimensions in twips. The Screen object also will give you the twips-per-pixel in each direction. With this information, you can calculate the window dimensions (in whatever units you choose) and resize the window by calling it's Move() method.
 
The twips per pixel seem to remain constant despite changes in resolution. I've always seen 15 for X and Y om my machines. You'll have to code your resolution at design-time and adjust according to the ratio of Run-time to Design-time at each Form Load. Don't forget the font sizes and picture sizes. Forms/Controls Resizing/Tabbing Control
Compare Code (Text)
Generate Sort Class in VB or VBScript
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top