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 }
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