如何使计算器可以在键盘数字键盘中使用? [英] How to Make Calculator can use in Keyboard Number Pad?

查看:151
本文介绍了如何使计算器可以在键盘数字键盘中使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用VB.NET创建了一个计算器;但我无法使其与数字键盘一起使用.非常感谢您的帮助.谢谢

I have created a calculator using VB.NET; but I can''t make it work with number pad. I really appreciate your help. Thanks

推荐答案

您确定已将Num Lock保持打开状态以启用数字键盘输入吗?

还是我想念什么?请详细阐述问题以获得更合适的答案.
Are you sure you''ve kept Num Lock ON for enabling Number pad inputs?

or I am missing something ? please elaborate question in detail for getting more suitable answers.


我认为您甚至可能在KeyDown中使用了KeyCode,例如
I think you might have used KeyCode in KeyDown even, like
e.KeyCode = Windows.Forms.Keys.D2


其中D2NumPad2不同.

尝试在KeyPress事件中使用KeyChar.

共享一些代码(如果这样做无济于事).


where D2 is different from NumPad2.

Try using KeyChar in KeyPress event.

Share some code if this doesn''t help.


您要做的就是敲击键盘上的NumLock键(指示灯应该亮起.)就这样,您的代码根本不需要执行任何操作.
All you do is hit the NumLock key on your keyboard (the light should turn on.) That''s it, nothing needs to be done in your code at all.


这篇关于如何使计算器可以在键盘数字键盘中使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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