实现隐藏窗体而非关闭的方法
时间:2014-03-19 16:44:21
收藏:0
阅读:551
当用户点击窗体上的关闭按钮时,如果不想关闭窗体而是隐藏它,可采用下面的方法。
// Use this event handler for the FormClosing event. private void MyForm_FormClosing(object sender, FormClosingEventArgs e) { this.Hide(); e.Cancel = true; // this cancels the close event. }
原文:http://www.cnblogs.com/xpvincent/p/3611499.html
评论(0)