I need to initialize a variable when the user presses Ctrl-Alt-Del. Because this key combination is treated differently than others, the Windows Security Dialog Box appears immediately after it is pressed and my program can not detect whether it is pressed. I tried adding the code below to the KeyDown event, but it does not work.
if ( (Keyboard.Modifiers == (ModifierKeys.Control | ModifierKeys.Alt)) && Keyboard.IsKeyDown(Key.Delete))
{
// Initialize a variable
}
If it is possible, how can I detect this key combination before the OS detects it? If not, how can I detect it after the OS?