Focus Method
private void btnStart_Click(object sender, EventArgs e)
{
btnStop.Focus(); //setting the focus on Stop Button
// ...your code
}
ActiveControl Property
private void btnStart_Click(object sender, EventArgs e)
{
this.ActiveControl = btnStop; //setting the focus on Stop Button
// ...your code
}
SelectNextControl Method
private void btnStart_Click(object sender, EventArgs e)
{
Control p;
p = ((Button)sender).Parent;
p.SelectNextControl(ActiveControl, true, true, true, true);
// ...your code
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…