[Source]Hibernate on/off

Posts 1–4 of 4 · Page 1 of 1
[Source]Hibernate on/off
Well i cracked the hibernate code to make it on and off.

[PHP]shell("powercfg /hibernate on")[/PHP]
[PHP]shell("powercfg /hibernate off")[/PHP]
So now use it!
For some reason it doesn't show the hibernate button in my start menu.

I use the following to hibernate:


Code:
Application.SetSuspendState(PowerState.Hibernate, True, False)
You can also set your system to sleep using the same method:

Code:
Application.SetSuspendState(PowerState.Suspend, True, False)
This is done via VB, not shell.
You had to "crack the hibernate code"

That's one of those standard MSDN things every coder should know

But anyway, thanks, Ill add it to snippets, where it belongs.

Remember everyone there is a section for this small stuff, no need for a whole thread, add it to snippets.

No more random one line threads
Posts 1–4 of 4 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us