VB 怎么自动按alt+c键
VB怎么自动按alt+c键PrivateSubTimer1_Timer()keybd_eventvbKeyAlt,0,0,0EndSub这样只按了一个Alt键我想它按Al...
VB 怎么自动按alt+c键
Private Sub Timer1_Timer()
keybd_event vbKeyAlt , 0, 0, 0
End Sub
这样只按了一个Alt键 我想它按Alt+C这个怎么做呢 展开
Private Sub Timer1_Timer()
keybd_event vbKeyAlt , 0, 0, 0
End Sub
这样只按了一个Alt键 我想它按Alt+C这个怎么做呢 展开
2个回答
展开全部
Public Sub DoubleKey(ByVal key1 As Byte, ByVal key2 As Byte)
Call keybd_event(key1, 0, 0, 0)
DoEvents
Call keybd_event(key2, 0, 0, 0)
DoEvents
Call keybd_event(key2, 0, 2, 0)
DoEvents
Call keybd_event(key1, 0, 2, 0)
DoEvents
End Sub
'用法
Private Sub Timer1_Timer()
DoubleKey vbKeyAlt, vbKeyC
End Sub
Call keybd_event(key1, 0, 0, 0)
DoEvents
Call keybd_event(key2, 0, 0, 0)
DoEvents
Call keybd_event(key2, 0, 2, 0)
DoEvents
Call keybd_event(key1, 0, 2, 0)
DoEvents
End Sub
'用法
Private Sub Timer1_Timer()
DoubleKey vbKeyAlt, vbKeyC
End Sub
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询