VB如何模拟按键
OptionExplicitPrivateDeclareFunctionPostMessageLib"user32"Alias"PostMessageA"(ByValhw...
Option Explicit
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Const WM_KEYDOWN = &H100
Private Const WM_KEYUP = &H101
Private Sub Command1_Click()
Dim hwd As Long
hwd = 1574346
PostMessage hwd, WM_KEYDOWN, vbKeyReturn, 0 '向目标句柄发送回车键
PostMessage hwd, WM_KEYUP, vbKeyReturn, 0
End Sub
请问如何在此基础上 能发送1健 2健后F1 F2 等
在线等
请问如何在此基础上能发送1健 2健 或F1 F2 等 展开
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Const WM_KEYDOWN = &H100
Private Const WM_KEYUP = &H101
Private Sub Command1_Click()
Dim hwd As Long
hwd = 1574346
PostMessage hwd, WM_KEYDOWN, vbKeyReturn, 0 '向目标句柄发送回车键
PostMessage hwd, WM_KEYUP, vbKeyReturn, 0
End Sub
请问如何在此基础上 能发送1健 2健后F1 F2 等
在线等
请问如何在此基础上能发送1健 2健 或F1 F2 等 展开
中通奥博
2024-08-15 广告
2024-08-15 广告
高尔夫模拟器安装调试过程通常包括多个步骤。首先,对模拟器硬件进行全面检查,确保所有部件完好无损。接着,根据场地情况,进行精确的位置摆放和校准。随后,进行软件安装和配置,包括系统测试、参数设置等,确保模拟器正常运行。最后,进行用户培训和试运行...
点击进入详情页
本回答由中通奥博提供
展开全部
Private Const WM_KEY1 =&H31
Private Const WM_KEY2 ==&H32
Private Const WM_KEYF1 ==&H70
Private Const WM_KEYF2 = =&H71
Private Const WM_KEY2 ==&H32
Private Const WM_KEYF1 ==&H70
Private Const WM_KEYF2 = =&H71
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
使用sendkeys函数。
sendkeys "a"'按a
sendkeys "+a"'按Shift+a
sendkeys "^a"'Ctrl+a
sendkeys "%a"'Alt+a
sendkeys "{Enter}"'回车
sendkeys "abcdef"'按顺序输入
sendkeys "a"'按a
sendkeys "+a"'按Shift+a
sendkeys "^a"'Ctrl+a
sendkeys "%a"'Alt+a
sendkeys "{Enter}"'回车
sendkeys "abcdef"'按顺序输入
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
vbKeyF1 112 F1 键
vbKeyF2 113 F2 键
vbKeyF3 114 F3 键
vbKeyF4 115 F4 键
vbKeyF5 116 F5 键
vbKeyF6 117 F6 键
vbKeyF7 118 F7 键
vbKeyF8 119 F8 键
vbKeyF9 120 F9 键
vbKeyF10 121 F10 键
vbKeyF11 122 F11 键
vbKeyF12 123 F12 键
vbKeyF13 124 F13 键
vbKeyF14 125 F14 键
vbKeyF15 126 F15 键
vbKeyF16 127 F16 键
vbKeyF2 113 F2 键
vbKeyF3 114 F3 键
vbKeyF4 115 F4 键
vbKeyF5 116 F5 键
vbKeyF6 117 F6 键
vbKeyF7 118 F7 键
vbKeyF8 119 F8 键
vbKeyF9 120 F9 键
vbKeyF10 121 F10 键
vbKeyF11 122 F11 键
vbKeyF12 123 F12 键
vbKeyF13 124 F13 键
vbKeyF14 125 F14 键
vbKeyF15 126 F15 键
vbKeyF16 127 F16 键
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询