如何捕获在C#的键盘敲击赢得窗体应用程序(CTRL + ALT + DEL) [英] How to trap the keyboard strokes on a c# win forms application (CTRl + alt +Del)

查看:556
本文介绍了如何捕获在C#的键盘敲击赢得窗体应用程序(CTRL + ALT + DEL)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有什么办法来处理<大骨节病>控制 + <大骨节病>替代 + <大骨节病>删除组合键。就拿测验中的应用程序(赢表格),用户不应该能够切换到其他窗口,直到测试结束。

Is there Any way to handle the Ctrl+Alt+Del Key combination. Take for instance in a quiz application (Win Forms), the user should not be able to switch to other windows till the test is over.

我能捕捉到<大骨节病>控制和<大骨节病>替代击键独立,使用C#标准属性。但一旦他们用户点击<大骨节病>删除键。控制超出我的蒋云良和窗口处理它。

I'm able to capture the Ctrl and Alt key strokes individually, using c# standard properties. but once they user hits the Del key . The control goes out of my appliation and windows handles it.

任何想法将是有益的。

Any thoughts would be helpful.

感谢。

推荐答案

根据其他的答案,似乎这是可以做到的。虽然我非常不鼓励这样。就拿你的程序应该因为某些原因挂(上帝保佑...)。然后,你将有这种情况,唯一的用户可以做的是关闭计算机的电源按钮(或拔出插头...)。

Based on other answers, it seems that this is possible to do. Although I highly discourage this. Take for instance that your program should for some reason hang (god forbid...). Then you would have the situation that the only thing the user can do is to turn off the computer with the power button (or pull the plug...).

这是一个很好的理由,这是很难做到的,而方法是不良记录...

It is for a good reason that this is difficult to do, and the methods are poorly documented...

这看起来像是要走的路的唯一途径,是的皮埃尔 - 阿兰·Vigeant 的评论如果这是一个小亭电脑什么的。然后,它实际上是有意义的做到这一点!

The only way this looks like the way to go, is the comment from Pierre-Alain Vigeant if this is a kiosk computer or something. Then it would actually make sense to do this!

这篇关于如何捕获在C#的键盘敲击赢得窗体应用程序(CTRL + ALT + DEL)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆