title: Keep track of current active windows user after switch user event in c#
body: <p>I'm trying to monitor the activity of the current user on a computer.<br>
  I have a process which monitors what it needs to monitor and saved on a file which user did the activity.<br><br>
  Currently, I'm saving on a file the name of the user who owns the process at the startup of that process, and the process starts automatically when a new user logs on. Thus, I can handle different users logging in on the same machine.<br>
  The problem occurs when there are 2 or more logged in users and they are being switched without logging off (for now I'm ignoring the case of RDP logins).<br><br>
  I've tried using the SystemEvents.SessionSwitch event, but it doesn't give me the new active user, it only tells me which user is no longer active. I thought of having a management process that is responsible for killing and restarting the monitor process after a user is switched, but that process also doesn't know which user is currently active.
  <br><br>
  If anyone has any idea how can I keep track of the active users, any help would be appreciated.<br>Thanks</p>