[zz]winform 窗体关闭事件

xiaoxiao2021-02-28  112

注册窗体关闭事件:

在Form1.Designer.cs 文件中添加:

 this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);

然后在form1中添加方法:

private void Form1_FormClosing(object sender, FormClosingEventArgs e)        {            some code;        }

转载请注明原文地址: https://www.6miu.com/read-25861.html

最新回复(0)