Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

vb.net - detect if NumLock is OFF and turn it always back ON

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 ?

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

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)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.

This would really irritate me.

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...