setting on-screen form size

Shaft

Registered User.
Local time
Today, 15:37
Joined
May 25, 2005
Messages
51
Could somebody please tell me how to set the size that my form will appear when loaded, because it's really annoying me trying to get them to appear at the size I want.
 
whilst in form design strecth the outer frame horizontally and vertically to the size you want,save the form. (works for me)
 
Last edited:
Remember to set the PopUp property to Yes, otherwise they'll probably maximise on the screen.
 
Searching is such a novel idea. :p

I prefer to customize and force the size of my forms with the InsideHeight & InsideWidth properties using the forms OnOpen event. I set my forms property to PopUp to NO and Modal to YES and I set the forms Control Box to NO and the Min MAx buttons to NONE and the Close button to NO.

Code:
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Err_Form_Open
    
    'just for testing
    MsgBox "InsideHeight = " & InsideHeight & vbCrLf & vbLf & "InsideWidth = " & InsideWidth
    
    InsideHeight = 5450 'twips is the unit of measurement
    InsideWidth = 7870
    
Exit_Form_Open:
    Exit Sub
    
Err_Form_Open:
    MsgBox Err.Number & " - " & Err.Description
    Resume Exit_Form_Open
    
End Sub
 

Users who are viewing this thread

Back
Top Bottom