在窗体加载事件中写入如下内容
System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer();timer.Tick += new System.EventHandler(this.timer_Tick);timer.Interval = 3000;//3000毫秒timer.Enabled = true;//控件生效
计时器添加
private void timer1_Tick(object sender, EventArgs e){//触发时间关闭窗体this.Close();}