Button1单击错误,我不知道为什么会这样

时间:2020-07-05 05:02:08

标签: vb.net mouseevent

Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
    Cursor.Position = New Point(150, 150)
    mouse_event(&H2)
    Cursor.Position = New Point(250, 250)
    mouse_event(&H4)
    Cursor.Position = New Point(250, 250)
    mouse_event(&H8)
    Cursor.Position = New Point(350, 350)
    mouse_event(&H10)
End Sub

上面的代码,我遇到Button1.Click的错误,无法弄清楚原因:

Handles子句要求使用包含类型或其基本类型之一定义的WithEvents变量。

0 个答案:

没有答案