Ok i am working on an application which is basically an activity monitor.
This application will automatically log out a user if there is no activity for some time. I have successfully done the logout part.
But i am trying to automatically start the application when another or same user logged in again.
I tried startup code but it only works when windows starts up.
private void SetStartup()
{
RegistryKey rk = Registry.CurrentUser.OpenSubKey
("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
rk.SetValue("My_App", Application.ExecutablePath);
}
So is there any way to know when someone login in the system. I am using winform and c#. Let me know if someone needs more information Thanks.