①如何设置窗口的位置:
在form的load事件中设置(eg:窗口居中显示):
this.Location = new Point(
(Screen.PrimaryScreen.WorkingArea.Width - this.Width) / 2,
(Screen.PrimaryScreen.WorkingArea.Height - this.Height) / 2
);
②设置窗口事件对应的处理方法(eg:shown事件的处理方法)
this.Shown += new EventHandler(doLogin);//事件委托
private void doLogin(object sender, EventArgs e)
{
}