?
Solved

getting notification when a users logs on and off

Posted on 2002-05-02
3
Medium Priority
?
157 Views
Last Modified: 2010-04-04
I am writing a service application and would like to know if there is a way to be notified by windows (2000, XP) when a user logs on and off the computer.
0
Comment
Question by:mdlittle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Expert Comment

by:W_Fox
ID: 6986910
I haven't developed services [yet], but if they receive standard windows messages, maybe trapping WM_USERCHANGED is the way. just my $0.02

W_Fox
0
 
LVL 8

Expert Comment

by:Cesario
ID: 6987011
w Fox is right

The WM_USERCHANGED message is sent to all windows after the user has logged on or off. When the user logs on or off, the system updates the user-specific settings. The system sends this message immediately after updating the settings.

WM_USERCHANGED  
wParam = 0;       // not used, must be zero
lParam = 0;       // not used, must be zero
0
 
LVL 8

Accepted Solution

by:
Cesario earned 2000 total points
ID: 6987069
If you are using a Service App then catch it in your message loop..

other wise

through a TAppEvents control onto a form

and have some code like

case Msg.Msg of
  WM_USERCHANGED : // your code here
  // other stuff
 end;


Best Regards

Cesario
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question