[AccessD] Disable Control Box with Form Maximized?

Charlotte Foust cfoust at infostatsystems.com
Thu Sep 1 12:18:49 CDT 2005


It can, I believe, be done with API calls, but it is definitely
draconian.  As long as you use the UnLoad event to make sure everything
runs properly before the form closes, does it really matter?  Windows
doesn't want users getting trapped in a window with no way out, so it
graciously shows a close button when you maximize a form.  If your code
breaks somehow so that your command button doesn't work (yes, I've had
that happen), the window close button would be the only way short of Alt
F4 to close the window.

If you still want to try it, search the archives.  I'm pretty sure it's
been explored here before.

Charlotte Foust


-----Original Message-----
From: Greg Smith [mailto:GregSmith at starband.net] 
Sent: Thursday, September 01, 2005 9:47 AM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Disable Control Box with Form Maximized?


Doris:

Thanks for responding!  I didn't realize the Form_Unload event could be
cancelled.  That does work and I can check it there.

However, I'd really like to just make the controlbox vanish so they
don't even have the choice.  But, if I set the Control Box property to
No for the form on the Properties Sheet, it only applies when the form
is NOT maximized.  If the form is maximized, the silly thing reappears
in the upper right hand corner.

Or is there another way to set that property?

Greg

> You have a couple of options...
>
> 1) Set the Control Box property of the form to False so the exit 
> button doesn't show.  The only problem with this approach is that you 
> lose the min/max buttons.
>
> 2) Call the code behind your Exit button from the Form_Unload event. 
> This code runs when the form is closed and before the form is removed 
> from memory.  Unlike the Form Close Event, the Form Unload Event can 
> be cancelled.
>
> Order of events when a form closes (Acces97 and up)...
>
> BeforeUpdate -> Unload -> Deactivate -> Close
>
> Doris Manning
> mikedorism at verizon.net
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com



-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list