How to block the system function key

xiaoxiao2021-03-06  33

Sometimes we don't want the program to be interrupted by the user with ALT TAB, CTRL ALT DEL, CTRL ESC and other system function keys (such as automatic demos), then what to do? Prompt you, when running the screen saver, these function keys don't work - that is, as long as you run in your program, "deceive" Windows, make it self-righteous in the screen The protection status will become! Please see the following code:

VAR

Temp: integer;

Begin

SystemParametersInfo (SPI_Screensaverrunning, 1, @temp, 0);

END;

Of course, don't forget to restore settings at the end of the program, and wake up Windows. code show as below:

VAR

Temp: integer;

Begin

SystemParametersInfo (spi_screensaverrunning, 0, @temp, 0);

END;

转载请注明原文地址:https://www.9cbs.com/read-54551.html

New Post(0)