VB6.0 我在模块里声明了keybd_event,结果timer里仍然显示函数未定义,是怎么回事?Public Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)Public Const keyeventf_keyup = &H2Private Sub TimerMP_Timer()NowMP = ncnr(1212 + ncnr(48 + (ncnr(13432652))))MaxMP = ncnr(1288 + ncnr(48 + (ncnr(13432652))))If NowMP < MaxMP * Val(Textdrug3.Text) / 100 Thenkeybd_event 105, 0, 0, 0kyebd_event 105, 0, keyeventf_keyup, 0End IfEnd Sub
1 回答
catspeake
TA贡献1111条经验 获得超0个赞
kyebd_event 105, 0, keyeventf_keyup, 0
改为
keybd_event 105, 0, keyeventf_keyup, 0
这是编程中的最低级错误,就是打字打错了。
- 1 回答
- 0 关注
- 111 浏览
添加回答
举报
0/150
提交
取消