FormClosedEventArgs.CloseReason 属性
来源:互联网 发布:windows网络编程教程 编辑:程序博客网 时间:2024/04/29 19:51
命名空间: System.Windows.Forms
程序集: System.Windows.Forms(在 system.windows.forms.dll 中)
public CloseReason CloseReason { get; }
/** @property */public CloseReason get_CloseReason ()
public function get CloseReason () : CloseReason
不适用。
属性值
System.Windows.Forms.CloseReason 枚举值之一。Form 关闭的原因很多,包括用户启动和编程的原因。CloseReason 属性指示关闭的原因。
下面的代码示例演示此成员的用法。在此例中,事件处理程序报告 Form.FormClosed 事件的发生。此报告有助于您了解事件的发生时间,并帮助您进行调试。要对多个事件或经常发生的事件进行报告,应考虑将 System.Windows.Forms.MessageBox.Show 替换为 System.Console.WriteLine,或者将该消息追加到一个多行 TextBox 的末尾。
要运行此代码示例,请将它粘贴到包含名为 Form1 的 Form 类型实例的项目中。然后,确保该事件处理程序与 Form.FormClosed 事件相关联。
private void Form1_FormClosed(Object sender, FormClosedEventArgs e) {System.Text.StringBuilder messageBoxCS = new System.Text.StringBuilder();messageBoxCS.AppendFormat("{0} = {1}", "CloseReason", e.CloseReason );messageBoxCS.AppendLine();MessageBox.Show(messageBoxCS.ToString(), "FormClosed Event" );}
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
Windows Vista、Microsoft Windows XP SP2 和 Windows Server 2003 SP1 支持 Microsoft .NET Framework 3.0。
.NET Framework
受以下版本支持:3.0、2.0参考
FormClosedEventArgs 类FormClosedEventArgs 成员
System.Windows.Forms 命名空间
Form
System.Windows.Forms.CloseReason
- FormClosedEventArgs.CloseReason 属性
- FormClosingEventArgs FormClosedEventArgs
- 属性
- 属性
- 属性
- 属性
- 属性
- 属性
- 属性
- 属性
- 属性
- 属性
- 属性
- 属性
- 属性
- 属性
- 属性
- 属性
- 用clojure解决euler problem 10
- 没有头文件怎么用别人的dll
- Servlet工作原理
- uva 10112 - Myacm Triangles
- css+div练手-工作室
- FormClosedEventArgs.CloseReason 属性
- mass storage
- js继承6-----寄生组合式继承
- Java中final 关键字相关 JVM编译static,final
- 《算法导论》 8.3 基数排序
- VCL组件之公用对话框组件
- php中DateTime的format格式以及 TtoDatetime函数
- Git详解之五 分布式Git
- 搜索到的NAS DIY 相关内容