Making a form "uncloseable"

R

Ricky

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
 
D

Douglas J. Steele

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.
 

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

Top