Click here to Skip to main content
13,042,421 members (137,346 online)
Rate this:
Please Sign up or sign in to vote.
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 22-Feb-12 0:19am
Rate this: bad
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.
Rate this: bad
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)


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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170713.1 | Last Updated 22 Feb 2012
Copyright © CodeProject, 1999-2017
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