开发者

Intercept WindowsKey + L (Lock) keypress in C#?

Is it possible to intercept the WindowsKey + L (The short cut to lock the console) from a running application?

I've got an app that needs to catch that and display a custom window for about 5 seconds, then allow the lock to go through.

Can I do this in natively in c#? If 开发者_开发技巧not, can I do this with some sort of Windows API?

Thanks in advance


It's definitely doable, but I'm afraid you need to pinvoke:

SetWindowsHookEx

LowLevelKeyboardProc

GetAsyncKeyState could be relevant, too

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜