Task List Switch to VB Application Fails After ALT+F4 CloseLast reviewed: June 21, 1995Article ID: Q81469 |
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
SUMMARYSelecting the Close command from the Control menu (ALT+F4) to quit a Visual Basic application will not necessarily unload any other forms that have been loaded. If other forms have been loaded but are not visible, the application may still be running under Windows. If this is the case, the Windows Task List will still contain the name of the application. Attempting to switch to the application from the Windows Task List will be unsuccessful. If you want the application to terminate as a result of unloading a particular form, place an End statement in the Form_Unload event procedure for the form, or use the Unload statement to unload all forms that are loaded. This will cause all forms (visible and invisible) to be unloaded, and the application to terminate.
MORE INFORMATIONEven if the form that is closed is the designated startup form in your application, it will not automatically unload previously loaded forms. Therefore, the application can in fact still be running and appear in the Windows Task List. You can terminate the application by selecting the End Task button in the Windows Task List, but you will not be able to switch to the task. Below are the steps necessary to cause an application to terminate when a particular form is closed from the Control menu (ALT+F4). With the application loaded in VB.EXE (the Visual Basic for Windows development environment), do the following:
|
Additional reference words: 1.00 2.00 3.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |