VB3 Killing an Application with System Menu Using VBLast reviewed: January 9, 1997Article ID: Q80186 |
The information in this article applies to:
- Standard and Professional Editions of Microsoft Visual Basic for Windows, versions 2.0 and 3.0 - Microsoft Visual Basic programming system for Windows, version 1.0
SUMMARYVisual Basic for Windows can use the Windows API SendMessage function to close any active window that has a system menu (referred to as control box within Visual Basic for Windows) with the Close option.
MORE INFORMATIONYou can use the Windows API SendMessage function to post a message to any window in the environment as long as the handle to the window is known. You can use the API FindWindow function to determine the handle associated with the window the user wants to close. Query on the following words in the Microsoft Knowledge Base for more information on the FindWindow function:
FindWindow and Visual BasicTo create a program to close an occurrence of the Windows version 3.0 Calculator program, do the following:
|
Additional reference words: 1.00 2.00 3.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |