How to Lock a Form so it Cannot Be MovedLast reviewed: June 21, 1995Article ID: Q118376 |
The information in this article applies to:
- Standard and Professional Editions of Microsoft Visual Basic for Windows, versions 2.0 and 3.0
SUMMARYThis article shows you how to remove the Move and Size menu items from the Visual Basic Control menu (also known as the System Menu) to prevent the form from being moved or sized by the user.
MORE INFORMATIONIf you do not want the user to be able to move or size your form, you can remove both or either of the Move or Size menu items from the Visual Basic control menu by using Windows API function calls. The GetSystemMenu API Function returns the handle to the Control menu. Then you can use that handle with the DeleteMenu API function to modify or delete specific menu items.
Step-by-Step ExampleThe following steps demonstrate how to remove the Move and Size menu items from the Visual Basic control menu:
REFERENCESAnother method, similar to the one presented here is presented in the following article in the Microsoft Knowledge Base: ARTICLE-ID: Q82876 TITLE : How to Disable Close Command in VB Control Menu (System Menu) |
Additional reference words: 2.00 3.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |