How To Terminate Windows From a 16-Bit VB Application (142820)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition, 16-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 16-bit, for Windows 4.0
This article was previously published under Q142820 SUMMARY
The Microsoft Visual Basic for Windows SendKeys function cannot be used to
close the Microsoft Windows Program Manager in order to terminate Microsoft
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: | Minor | Last Reviewed: | 7/13/2004 |
---|
Keywords: | kb16bitonly kbCtrl kbhowto KB142820 |
---|
|