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

How do you control someone from closing your program?

Status
Not open for further replies.

f1car

Technical User
Apr 2, 2001
69
US
How do you control someone from closing your program?

Thank you.



 
closing the program means?protect thru control box(close window) or by alt+f4.
if u want to control some thru the control box. u must set up the form property ControlBox=False.
this property disappear the min,max,close option in the control bar.
try this and i hope this will help u.
webspy
 
And one more small tip...
Add this to your Form_Unload sub

Cancel=True

this will cancel the unload procedure of form so your program will not be closed. But anyone may close it by using Ctrl+Alt+Del and then kill task..

Hope it works.
Let me know if its.
Bye
 
According to the MS exam you put the cancel = true in the Queryunload event of the form.

Putting cancel = true just like that disables the form from unloading.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top