How Can make a form only close with code? I have taken the X (close button away) but can still right click on the window in the toolbar and close it how can i stop this?
Have a boolean value that is set to false (you set it to true in the code when you want to be able to exit) and in the form_unload event if the value is false then set the cancel flag which will stop the form unloading.
Hope this helps
HarleyQuinn
---------------------------------
Get the most out of Tek-Tips, read FAQ222-2244 before posting.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.