1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Const MOUSEEVENTF_LEFTDOWN = &H2
Const MOUSEEVENTF_LEFTUP = &H4
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Dim localPoint As New Point(WebBrowser1.Width \ 2 + 220, Panel1.Height \ 2 - 120)
Cursor.Position = WebBrowser1.PointToScreen(localPoint)
mouse_event(MOUSEEVENTF_LEFTDOWN + MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
End Sub |
Partager