Form.
You can use the CloseButton property to specify whether the Close button on a form is enabled.
The CloseButton property uses the following settings.
Setting | Description | Visual Basic |
Yes | (Default) The Close button is enabled. | True (-1) |
No | The Close button is disabled and the Close command isnt available on the Control menu. | False (0) |
You can set the CloseButton property in the form or reports property sheet, a macro, or using Visual Basic.
You can set the CloseButton property only in form Design view.
If you set the CloseButton property to No, the Close button remains visible but is dimmed, and you must provide some other way to close the form for example, a command button or custom menu command that runs a macro or event procedure that closes the form.
BorderStyle Property, ControlBox Property, MinMaxButtons Property.