Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: .NET3.5
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 22-Feb-12 1:19am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Assuming that you are talking about the window close of your own application this can be done by:
 
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)
 
System.Diagnostics.Process
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 8,149
1 Sergey Alexandrovich Kryukov 7,287
2 DamithSL 5,614
3 Manas Bhardwaj 4,986
4 Maciej Los 4,910


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 22 Feb 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100