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

查看:15
本文介绍了检测 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.

另一种选择是接受数字键盘箭头键(等)并将它们即时转换为数字,这可能吗?(例如,忽略 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 中做到这一点的(快速谷歌发现 http://support.microsoft.com/kb/177674),但一般来说,像这样更改机器范围的设置是不受欢迎的:用户习惯于他们的numlock(或 capslock 或其他)键状态的个人偏好......而您正在覆盖它.

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天全站免登陆