Making a form "uncloseable"

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i would like to make a form that can not be closed or minimised.

BUT the form will be maximised to full screen. so even when i set the MinMax
Buutons to None the restore button is still visible and can used to minimise
the form.

what i am using the form to do is to have a password box where the user must
enter the password to gain access to the system. at the moment, they can
minimise the form and use the system anyway. and when i have set up the
startup properites (tools startup and unchecked ALL of the boxes) the user
can still go File>Close and close that form.

Anyhelp on how to do this will be excellent, do u need to use a modal window
or something... i dont have a clue about them.

thanks a lot in advance

ricky
 
You can put code in the form's Unload event to check whether they've met
whatever condition(s) is/are necessary to be able to close the form. If they
haven't, set Cancel=True, and they won't be able to close the form.
 
Back
Top