HOWTO: Block CTRL+ALT+DEL and ALT+TAB in Windows 95Last reviewed: October 13, 1997Article ID: Q161133 |
The information in this article applies to:
WARNING: ANY USE OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
SUMMARYYou can prevent the CTRL+ALT+DEL and ALT+TAB key combinations from bringing up a task list in Windows 95 by calling the SystemParametersInfo function in the Win32 API. A step-by-step example of this appears below. NOTE: This is possible only in Windows 95.
MORE INFORMATIONSometimes it is necessary for a program to prevent the use of the CTRL+ALT+DEL key combination to bring up the Close Program task list to end a task or shut down Windows 95 and to prevent the use of the ALT+TAB key combination to switch tasks. The following technique uses the SystemParametersInfo API to trick Windows 95 into thinking that a screen saver is running. As a side effect, CTRL+ALT+DEL and ALT+TAB are disabled. The Win32 SDK states:
"SPI_SCREENSAVERRUNNING Windows 95: Used internally; applications should not use this flag. Windows NT: Not supported."Note that disabling CTRL+ALT+DEL is not recommended because the Close Program dialog box was created to enable users to terminate misbehaving applications. If a program "hangs" while CTRL+ALT+DEL is disabled, it may not be possible to terminate it by any method other than rebooting the machine, which could result in the loss of data. Also, this technique may not work in future versions of Windows.
Step-by-Step Example
REFERENCESMicrosoft Developer Network CD (A subscription to the Microsoft Developer Network may be purchased from Microsoft. For more information on this product call (800)759-5474 in the U.S. and Canada.)
|
Additional query words: reboot
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |