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

Disabling the Close, Maximize and Minimize buttons 1

Status
Not open for further replies.

MaceGoth

MIS
Sep 30, 2003
18
0
0
US
Is it prossible to disable these buttons with a script or is Visual Basic not able to do it?
 
You can set the MinButton = False & MaxButton = False in the Forms Properties Window.... Not Sure if this is what you were after?
 
Yes that does help me but is there a way to disable the close button? Thanks again! [2thumbsup]
 
Set the borderStyle = None or place the following code on your form.

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If Cancel <> 1 then
Cancel = -1
End IF
End Sub
 
... or set the ControlBox property to False?

Andy
&quot;Logic is invincible because in order to combat logic it is necessary to use logic.&quot; -- Pierre Boutroux
&quot;Why does my program keep showing error messages every time something goes wrong?&quot;
 
And remember that you can disable any button you want, i.e; its not necessary to disable all the three of them.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top