开发者

GetAysncKeyState lowercase

I have declared the function

Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Int32) 开发者_StackOverflow社区As Integer

But a code such as

If GetAsyncKeyState(100) then
'do something
End

Will not work [It used to -.-]. However replacing 100 with 'Keys.D' will. Which leaves the problem of being limited to capital letters.

Is there a way to have Keys.a (as lowercase) or a way to use ascii codes in GetAsyncKeyState?

Thanks in advance.


100 (decimal) is VK_NUMPAD4 (0x64)?

If you want to detect lowercase you would need to examine the state of VK_CAPITAL & VK_SHIFT.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜