Enable/Disable The Control Box X Button

Status
Not open for further replies.

ghudson

Registered User.
Local time
Today, 01:58
Joined
Jun 8, 2002
Messages
6,194
Here is a sample Access 97 db that will show you how to disable and/or enable the control box X button that most Windows programs have in the upper right corner. Sometimes we do not want our users to exit a database unless they have clicked our custom exit button. Disabling the X button will prevent that option for when you have the need to control that function. This is demonstrated in the "fDisableControlBoxX" form. The public function is in the "dDisableControlBoxX" module.

As a bonus I have also include a form named "fTestCancelFromUnloadEvent" which will demonstrate how you can prevent a user from closing a form and also the application unless they do exactly what you want them to do.

Read this if you do not understand where to post your questions! >>> Please Read Before Posting

Please do not directly PM me with any questions related to my DisableControlBoxXOption example. Please do not post any questions related to my DisableControlBoxXOption example in the Samples forum. If you have a question related to the DisableControlBoxXOption sample... Please post your questions in the appropriate forum and include a link to this thread if you have a question or problem related to my DisableControlBoxXOption example. I will be glad to help if I see your post and if I am available.

Key Search Words: disable, prevent, cancel, control box x button, close x button, close x, close, corner,
 

Attachments

Status
Not open for further replies.

Users who are viewing this thread

Back
Top Bottom