Smart Device
.NET Development
VS Express Editions
Microsoft ISV
Visual C#
Game Technologies
VS Team System
Windows Live
Visual FoxPro
Visual Studio
SQL Server
Architecture
Visual C++
Windows Vista
Windows Forms
Software Development Network>> Visual C#>> How will I know what closed the form?
How will I know what closed the form?
Hot Topic
FileStream File Permissions
Checking if a specific handler exists
Fast Range Search?
Call Tree?
Navigation Bar (Unknow Scope)
file upload user control
Packet Aleration While in Transit
In C# ,is there any similar to "vbCrLf" in visual basic ?
BackgroundWorker and SHGetFileInfo
Inheritance Issue!!!!!
Visual C#
requiring a override method to call the overridden method
Random result
How to write 3-Tier Application using c# windows Application with MS SQL Server 2000?.
Combo Auto Complete ?
To choose between C# and VB
Distributing boilerplate code
Noob in C# having problems calling dll made in Borland Delphi 5
VS 8 Performance makes it unuseable
Problem REFRESHING UserPaint-ed controls.
Deleting IE Cache
How will I know what closed the form?
If it's the Close button (this.Close()), the red X button in the upper right corner, Alt+F4, or something else.
Answer this question
How will I know what closed the form?
thdwlgP
Thanks!
fishy124
In FormClosing or FormClosed events, check the eventarg's CloseReason property, it has any of the CloseReson enum values:
http://msdn2.microsoft.com/en-us/library/System.Windows.Forms.CloseReason.aspx
Regards,
-chris
How will I know what closed the form?
Answer this question
How will I know what closed the form?
thdwlgP
fishy124
http://msdn2.microsoft.com/en-us/library/System.Windows.Forms.CloseReason.aspx
Regards,
-chris