Example #1
0
 public static void LockPC()
 {
     try
     {
         MyComputer.LockWorkStation();
     }
     catch
     {
     }
 }
Example #2
0
 public static void LogOff()
 {
     try
     {
         MyComputer.ExitWindowsEx(0U, 0U);
     }
     catch
     {
     }
 }
Example #3
0
 private static void SetMonitorInState(MonitorState state)
 {
     MyComputer.SendMessage((int)ushort.MaxValue, 274, 61808, (int)state);
 }
Example #4
0
 public static void Turnoffmonitor()
 {
     MyComputer.SetMonitorInState(MonitorState.MonitorStateOff);
 }