Cursor.Position = new Point( //Screen.PrimaryScreen.Bounds.X + Screen.PrimaryScreen.Bounds.Width / 2, // Screen.PrimaryScreen.Bounds.Y + Screen.PrimaryScreen.Bounds.Height / 2);
static void SystemEvents_SessionSwitch(object sender, Microsoft.Win32.SessionSwitchEventArgs e) { if (e.Reason == SessionSwitchReason.SessionUnlock) { //unlock screen Console.WriteLine("Screen unlocked"); } }
SystemEvents.SessionSwitch += SystemEvents_SessionSwitch;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)