How-to restrict access to Close button

  • Thread starter Thread starter Patrick
  • Start date Start date
P

Patrick

HI!!

Is it possible to prevent the user from pressing the 'X'
button a the top right corner.(for closing application and
returning to windows)

Any help would be appriciated!
thanx,
Patrick
 
You could open a hidden form on startup, and in it's Unload event cancel.
However you should seriously consider whether this is a good idea.

If users try to close the application using the close button (like they do
in any other Windows application), they'll get frustrated and just use
Ctrl-Alt-Del or hit the power button to get their way.

You could, instead of cancelling the unload of the hidden form, use it to do
any cleanup.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top