给窗体添加Shown事件
public void Form_Shown(object sender, EventArgs e)
{
this.Activate();
this.Focus();
//定义窗体中某控件获取焦点
this.textbox.Focus(); }