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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamically resizing forms

Status
Not open for further replies.

vinodi

Programmer
Joined
May 23, 2003
Messages
41
Location
IN
Hi,

I have developed an application that has MDI interface ( in VB 6 - SP4). This application when invoked on a laptop does not occupy the entire screen. The application has been designed on a resolution of 800 x 600 on a standard PC. How can I dynamically resize my MDI form to fit on the screen according to the resolution of the screen. All child forms in this application are having border as fixed single. Let me tell you before hand that changing the border style does not result in any change.

Any help in this matter will be highly appreciated.

Thanx in advance.

Vinod Inamdar
 
Hi,

You should ask the question in the VB6 Forum (forum222). But here is a clue...
-----------------------------------
Private Sub Form_Load()
Me.StartUpPosition = 2 ' CenterScreen
Me.Height = Screen.Height
Me.Width = Screen.Width
End Sub
-----------------------------------
I would probably store the size of the form in the registry and then only resize the form(s) if the saved value is larger than the screen.


Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top