VB 2010 sendkeys错误

时间:2017-08-02 10:25:51

标签: vb.net sendkeys

我第一次使用VB。我不知道,为什么这个简单的代码不起作用。

Imports System.Runtime.InteropServices

Public Class Form1

    Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Application.Exit()
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Dim ProcID As Integer
        ProcID = 2940
        AppActivate(ProcID)
        SendKeys.SendWait("Username")
        SendKeys.SendWait("{ENTER}")
        SendKeys.SendWait("Password")
        SendKeys.SendWait("{ENTER}")
    End Sub
End Class

错误: enter image description here

1 个答案:

答案 0 :(得分:0)

因为Game Guard是我的窗口保护.... "只是"绕道及其完成=)