设置窗体关闭按钮无效 窗体右上角差号关闭按钮无效化privatevoidForm1_FormClosing(objectsender,FormClosingEventArgse){e.Cancel=true;//取消该事件}
OnPaint重绘窗体 重写窗体重绘事件 protected override void OnPaint(PaintEventArgs e) { e.Graphics.DrawImage((Image)pic,new Point(0,0));//重绘窗体 }