[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 439
  • Last Modified:

Form closing question

Is there a way to distinguish programmatically whether a user closed the form by clicking on the x or whether the computer was restarted, as a result closing the form?
0
YZlat
Asked:
YZlat
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
you can use the CloseReason of the args sent to the FormClosing event. Check http://msdn.microsoft.com/en-us/library/system.windows.forms.formclosingeventargs.closereason.aspx
0
 
YZlatAuthor Commented:
Perfect! just what I was looking for
0

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now