VB3: HOWTO: Terminate Windows from a Visual Basic Application (76981)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition for Windows 2.0
- Microsoft Visual Basic Standard Edition for Windows 3.0
- Microsoft Visual Basic Professional Edition for Windows 2.0
- Microsoft Visual Basic Professional Edition for Windows 3.0
- Microsoft Visual Basic Standard Edition for Windows 1.0
This article was previously published under Q76981 SUMMARY
The Visual Basic SendKeys function cannot be used to close Program Manager
in order to terminate Windows. To correctly close Program Manager, you must
invoke the ExitWindows API function as shown below.
Many software setup or installation programs are designed to exit Windows,
and then restart Windows when the setup or installation is complete. You
can make a Visual Basic program automatically exit Windows and then restart
Windows by passing the EW_RESTARTWINDOWS value to the ExitWindows API
function. The value for the EW_RESTARTWINDOWS constant is &H42.
Modification Type: | Major | Last Reviewed: | 12/12/2003 |
---|
Keywords: | kbhowto kbWndw KB76981 |
---|
|