Alt + F4 only sends a WM_CLOSE
message to the WM_CLOSE
. The program may respond to this message by closing the window, or it may not.
Ctrl + Alt + Del is processed by the system and is not sent to applications. In order to intervene in his work, you will have to, I am afraid, descend to the level of the keyboard driver.
As for Ctrl + Alt + Del, here is the translation of the answer from serverfault :
The Windows kernel (NT) is arranged in this way: it reserves notification of this key combination only for the Winlogon system process. Thus, if Windows is working correctly, then no user application can handle this key combination. If it could, it could show the fake login screen to the user and thus intercept his password;)
This article says that
It is impossible to mimic the Ctrl-Alt-Del SendKeys
using SendKeys
. Pressing Ctrl-Alt-Del causes a hardware interrupt, through a direct separate wire on the keyboard.
That is, and intercept it from Windows will not work.
Humble yourself.