2
Answers

C# code to monitor user activity

Austin Mudadi

Austin Mudadi

7y
335
1
Hi,
Is there any sample code or link that can help me to develop a system that monitors user activity on a pc using c#.Any help is appreciated. 
Answers (2)
0
Rahul Kaushik

Rahul Kaushik

NA 383 14.5k 7y
create a session_switch function inside the application,
and along that
use if else case as below
 
if (e.Reason == SessionSwitchReason.SessionLock)
{
Print for unlock 
}
else
if (e.Reason == SessionSwitchReason.SessionUnlock)
{
Print for Login 
}  
 
 
 and use your own define function like tracking the system clicks of the user. Windows open on System.clicks as well as track and store the time when person is doing activity.
 
Track the application open  
 
0
Manas Mohapatra

Manas Mohapatra

NA 29.3k 3.3m 7y
Follow below links that help you:
 
https://vinceavery.wordpress.com/2016/10/26/monitoring-user-activity/ 
 
https://stackoverflow.com/questions/24403654/monitor-user-activities-using-c-sharp 
 
https://channel9.msdn.com/Forums/Sandbox/258841-Coding-4-Fun-Activity-Monitor-C 
 
https://msdn.microsoft.com/en-us/library/microsoft.win32.systemevents(v=vs.110).aspx