[AccessD] Disable Control Box with Form Maximized?

Greg Smith GregSmith at starband.net
Thu Sep 1 11:47:11 CDT 2005


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






More information about the AccessD mailing list