请问如何判读键盘上的按键是否处于按下状态

loading1412 2013-01-03 02:27:57
如何用一个语句来判读如"X"键是否处于按下状态,VB中有判读按键电位的语句么(提供个C语言语句也可以)
尝试编写连发时想到的,keypress,keydown,keyup只能模拟键盘操作;gelastkey也不能判断键盘状态
...全文
62 点赞 收藏 3
写回复
3 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
东方之珠 2013-01-03
回复
sosoben 2013-01-03
GetKeyState If the high-order bit is 1, the key is down; otherwise, it is up. If the low-order bit is 1, the key is toggled. A key, such as the CAPS LOCK key, is toggled if it is turned on. The key is off and untoggled if the low-order bit is 0. A toggle key's indicator light (if any) on the keyboard will be on when the key is toggled, and off when the key is untoggled.
回复
bcrun 2013-01-03
GetKeyState
回复
相关推荐
发帖
VB基础类
创建于2007-09-28

7521

社区成员

VB 基础类
申请成为版主
帖子事件
创建了帖子
2013-01-03 02:27
社区公告
暂无公告