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.
我尝试将下面的代码添加到 KeyDown 事件中,但它不起作用。
if ( (Keyboard.Modifiers == (ModifierKeys.Control | ModifierKeys.Alt)) && Keyboard.IsKeyDown(Key.Delete))
{
// Initialize a variable
}
如果可能的话,我怎样才能在操作系统检测到这个组合键之前检测到它?如果没有,操作系统后如何检测?
简而言之,你不能。 http://blogs.msdn.com/larryosterman/archive/2005/01/24/359850.aspx
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)