VB中postmessage用法
使用postmessage时PrivateDeclareFunctionfindwindowLib"user32"Alias"findwindowA"(ByValipcl...
使用postmessage时
Private Declare Function findwindow Lib "user32" Alias "findwindowA" (ByVal ipclassname As String, ByVal ipwindowname As String) As Long
Private Const wm_keydown = &H100
Private Const wm_keyup = &H101
Private Const WM_CHAR = &H102
PostMessage hwnd, wm_keydown, keycode, 49
提示说keycode未定义
keycode 是什么意思。怎么定义啊
我想按1键应该怎么写
哦,我弄错了,应该是PostMessage hwnd, wm_keydown, 49, 0
还有一个问题,UP键是38,为什么不行。其它键都可以。 展开
Private Declare Function findwindow Lib "user32" Alias "findwindowA" (ByVal ipclassname As String, ByVal ipwindowname As String) As Long
Private Const wm_keydown = &H100
Private Const wm_keyup = &H101
Private Const WM_CHAR = &H102
PostMessage hwnd, wm_keydown, keycode, 49
提示说keycode未定义
keycode 是什么意思。怎么定义啊
我想按1键应该怎么写
哦,我弄错了,应该是PostMessage hwnd, wm_keydown, 49, 0
还有一个问题,UP键是38,为什么不行。其它键都可以。 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询