ncnr是没有问题,麻烦看看看keybd_event的情况?

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 = &H2

Private Sub TimerMP_Timer()
NowMP = ncnr(1212 + ncnr(48 + (ncnr(13432652))))
MaxMP = ncnr(1288 + ncnr(48 + (ncnr(13432652))))
If NowMP < MaxMP * Val(Textdrug3.Text) / 100 Then
keybd_event 105, 0, 0, 0
kyebd_event 105, 0, keyeventf_keyup, 0
End If

End Sub

梦里花落0921
浏览 112回答 1
1回答

catspeake

kyebd_event 105, 0, keyeventf_keyup, 0改为keybd_event 105, 0, keyeventf_keyup, 0这是编程中的最低级错误,就是打字打错了。
打开App,查看更多内容
随时随地看视频慕课网APP