检测NumLock是否关闭,并始终将其重新打开 [英] detect if NumLock is OFF and turn it always back ON

查看:137
本文介绍了检测NumLock是否关闭,并始终将其重新打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以检测NumLock是否已关闭以及如何在我的VB APP运行时自动将其重新打开?

What is a method to detect if NumLock is OFF and how to turn it always back ON automatically when my VB APP is running ?

我的应用程序是专用的应用程序,可在带有外部数字键盘设备的专用计算机上运行.

My app is dedicated app, running on dedicated computer with external numpad device.

另一种选择是接受NUMPAD箭头键(等)并将其即时转换为NUMBERS,这可能吗? (例如,忽略numlock处于关闭状态,并在numlock处于打开状态时进行操作)

another option would be to ACCEPT NUMPAD ARROW KEYS (etc) and convert these to NUMBERS on fly, is it possible?? (e.g. ignore the numlock off situation and behave as numlock is on)

推荐答案

我不确定您如何在vb.net中专门进行此操作(快速的Google找到了

I'm not sure how you do this specifically in vb.net (a quick google found http://support.microsoft.com/kb/177674), but generally speaking changing machine-wide settings like this is frowned upon: users are accustomed to their individual preference for numlock (or capslock -- or whatever) key state...and you're overriding it.

这会真的激怒我.

也就是说,在您的应用是唯一正在运行的情况下(例如POS软件,医疗办公室管理软件等),这可能没事.

That said, in circumstances where your app is the only thing running (e.g., POS software, medical office management software, etc) this might be ok.

这篇关于检测NumLock是否关闭,并始终将其重新打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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