Главная страница | назад





Article #20177: How to disable Ctrl-Alt-Del and Alt-Tab key combo under Win95.

Question:

How can I disable the Ctrl-Alt-Del key combonation in my application?

Answer:

Under Win95/98, Ctrl-Alt-Del and Alt-Tab are disabled when a screensaver is active. You can use the Windows API function SystemParametersInfo to make the system think a screensaver is active while your application is running.

Example:

// disable ctrl-alt-del and alt-tab
int result;
SystemParametersInfo(SPI_SCREENSAVERRUNNING, true, &result, NULL);
// enable ctrl-alt-del and alt-tab
int result;
SystemParametersInfo(SPI_SCREENSAVERRUNNING, false, &result, NULL);

Last Modified: 11-JAN-00