Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Lock the form size 1

Status
Not open for further replies.

larrinh

Electrical
May 30, 2003
3
Is there a way to lock the form size in VB6? I use the following code right now but it produces a runtime error if you attempt to minimize the form which the users must be able to do.

Code:
Private Sub Form_Resize()
   Form1.Height = 8175
   Form1.Width = 8550
End Sub


 
Replies continue below

Recommended for you

You will have to put in a check to see what the window state is before allowing the code to run.
 
Just put On Error Resume Next as the first line in Form_Resize
 
Or, better still, in the Form properties make BorderStyle 1 and MinButton true then you do not need the resize event at all.
 
Thanks for the help. They are all good solutions but I have to give the most credit to FrancisL for his second post as it is the way it should be done.

I should have found this solution myself.



**********************************
Time is the fire in which we burn.
**********************************
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor