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