C# 模拟按下回车键自动登录

 1 private void Form1_Load(object sender, EventArgs e)
 2 {
 3     //this.Show();
 4     this.Activate();
 5     //this.Focus();
 6     SendKeys.Send("{ENTER}");
 7 }
 8 
 9 private void button1_Click(object sender, EventArgs e)
10 {
11     MessageBox.Show("自动点击生效了");
12 }

 

转载于:https://www.cnblogs.com/geekworld/p/3946378.html

你可能感兴趣的:(C# 模拟按下回车键自动登录)