Lock, Sleep or Hibernate Windows using C#

January 28, 2009 | 4 Comments

I don’t think there is a Windows developer who has not done this with his or her favorite programming language. So here is the C# version. Putting Windows in Sleep or Hibernate mode can be done with one line of code using the Windows.Forms.Application object’s SetSuspendState method, and locking can be done using Win32′s LockWorkStation [...]

Filed Under: WinForms