Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vb.net 发送键不工作?_Vb.net - Fatal编程技术网

Vb.net 发送键不工作?

Vb.net 发送键不工作?,vb.net,Vb.net,这就是代码,错误是“SendKeys是一种类型,不能用作表达式。” 我怎样才能解决这个问题? 谢谢 使用 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click CheckBox1.Checked = True While CheckBox1.Checked = True SendKeys("{END}")

这就是代码,错误是“SendKeys是一种类型,不能用作表达式。” 我怎样才能解决这个问题? 谢谢

使用

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    CheckBox1.Checked = True
    While CheckBox1.Checked = True
        SendKeys("{END}")
    End While
End Sub
您需要引用SendKeys.Send()

使用

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    CheckBox1.Checked = True
    While CheckBox1.Checked = True
        SendKeys("{END}")
    End While
End Sub
您需要引用SendKeys.Send()

使用
SendKeys.Send({END}),True)
使用
SendKeys.Send({END}),True)