vb发送按键alt+←
答案:4 悬赏:0 手机版
解决时间 2021-04-04 13:51
- 提问者网友:孤凫
- 2021-04-04 08:43
vb发送按键alt+←
最佳答案
- 五星知识达人网友:话散在刀尖上
- 2021-04-04 09:58
***全局模拟键盘按键-------------
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Declare Function MapVirtualKey Lib "user32" Alias "MapVirtualKeyA" (ByVal wCode As Long, ByVal wMapType As Long) As Long
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Const KEYEVENTF_KEYUP = &H2
Const VK_LWIN = &H5B
Private Sub Timer1_Timer()
Call keybd_event(vbKeyMenu , 0, 0, 0) 'Alt键键按下
Call keybd_event(vbKeyClear, 0, 0, 0) 'm键按下 vbKeyClear 为'清除键
Call keybd_event(vbKeyMenu, 0, KEYEVENTF_KEYUP, 0) 'Alt键键弹起
End Sub
格式你自己调整下 按键码你可以自己改的
记得给分哦
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Declare Function MapVirtualKey Lib "user32" Alias "MapVirtualKeyA" (ByVal wCode As Long, ByVal wMapType As Long) As Long
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Const KEYEVENTF_KEYUP = &H2
Const VK_LWIN = &H5B
Private Sub Timer1_Timer()
Call keybd_event(vbKeyMenu , 0, 0, 0) 'Alt键键按下
Call keybd_event(vbKeyClear, 0, 0, 0) 'm键按下 vbKeyClear 为'清除键
Call keybd_event(vbKeyMenu, 0, KEYEVENTF_KEYUP, 0) 'Alt键键弹起
End Sub
格式你自己调整下 按键码你可以自己改的
记得给分哦
全部回答
- 1楼网友:山河有幸埋战骨
- 2021-04-04 14:34
什么意思?
- 2楼网友:長槍戰八方
- 2021-04-04 12:56
sendkey
- 3楼网友:三千妖杀
- 2021-04-04 11:27
SendKeys "%{LEFT}"
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯