Click here to Skip to main content
15,896,915 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to know how to track when the browser directly close by end user.

I want to know his/her log out time when window close by alt+f4 or close button or close by the task bar etc.

Please send me the solution of this problem...
Posted

I'm afraid, there is no consistent way to do this.
Window Close Event of Browser[^] discusses some approaches, but again, different browsers may have different results on the close events.
 
Share this answer
 
Assuming that you are talking about the window close of your own application this can be done by:

C#
Application.ApplicationExit += new EventHandler(Application_ApplicationExit);


But if you are talking about any other appllication running in OS then perhaps u can use some method of following class to monitor the required windows is being opened or closed (as that will start or stop the related process too)

C#
System.Diagnostics.Process
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900