ACC: Maximized Form Shows Control Box, Min/Max/Restore ButtonsLast reviewed: September 23, 1997Article ID: Q128196 |
The information in this article applies to:
SYMPTOMSAdvanced: Requires expert coding, interoperability, and multiuser skills. In Microsoft Access 97, a form whose ControlBox, MinMaxButtons, and ControlBox properties are set to No still displays the Restore and Close buttons when you maximize the form. In Microsoft Access 2.0, a form whose ControlBox, MinButton, and MaxButton properties are set to No still displays the Control-menu box and a Restore button when you maximize the form. This article assumes that you are familiar with Visual Basic for Applications and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Visual Basic for Applications, please refer to your version of the "Building Applications with Microsoft Access" manual. NOTE: Visual Basic for Applications is called Access Basic in Microsoft Access version 2.0. For more information about Access Basic, please refer to the "Building Applications" manual.
CAUSEMicrosoft Access is a multiple document interface (MDI) application. The default behavior for an MDI application is for all maximized child windows to always display a Control-menu box and a Restore button.
RESOLUTIONYou can simulate maximizing a window by sizing it as large as possible in the restored, windowed (non-maximized), state using the following technique. The following example demonstrates how to create and use a sample Sub procedure called MaximizeRestoredForm to restore a form if it is maximized and then move it to the upper left corner of the Microsoft Access client area window and size it as large as possible. NOTE: This technique will produce a blank section at the top of the form that is approximately the height and width of a toolbar, if the form is opened in Design view, and then switched to Form view. This code works best when the form is opened from the Database window or through code while running the application. NOTE: In the following sample code, an underscore (_) at the end of a line is used as a line-continuation character. Remove the underscore from the end of the line when re-creating this code in Access Basic.
STATUSThis behavior does not occur in Microsoft Access 7.0. Keywords : kbusage PgmApi FmsProp Version : 2.0 97 Platform : WINDOWS Hardware : x86 Issue type : kbprb Solution Type : kbcode |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |