VB 如何实现向句柄发送按一次回车键?
2个回答
展开全部
VB向句柄发送回车键:
rivate Function SendClick(hwnd As Long, mX As Long, mY As Long)
'发送点击消息
Dim I As Long
I = PostMessage(hwnd, WM_LBUTTONDOWN, 0, (mX And &HFFFF) + (mY And &HFFFF) * &H10000)
I = PostMessage(hwnd, WM_LBUTTONUP, 0, (mX And &HFFFF) + (mY And &HFFFF) * &H10000)
End Function
展开全部
l = SendMessage(A(i), WM_SETTEXT, 0, strW + c & Chr(0))
Sleep 10
l = PostMessage(A(i), WM_KEYDOWN, vbKeyReturn, 0)
Sleep 10
DoEvents
l = PostMessage(A(i), WM_KEYUP, vbKeyReturn, 0)
Sleep 10
Sleep 10
l = PostMessage(A(i), WM_KEYDOWN, vbKeyReturn, 0)
Sleep 10
DoEvents
l = PostMessage(A(i), WM_KEYUP, vbKeyReturn, 0)
Sleep 10
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询