The Story:
I was looking for a alarm clock software that will wake me up at 6:00am so that I can start spaming here at VBF as soon as possible.

But I don't want to keep my PC turned on all night.
Many modern motherboards supports automatic boot-up alarm. But my motherboard doesn't. 'Wake on LAN' may be an option, but I don't have a LAN. 'Wake on Modem Ring' may be another option, but I gave my dial-up modem to my friend.
So, here is my workaround: Keep the PC in Hibernate (Suspend) mode and wake it up at 6:00am.
The Program:
This program simply puts the PC in hibernation state and wakes it up at a pre-defined time. Optionally it can sound an alarm when it wakes up. (You must keep the power on.

)
Before We Begin:
1.) This works only in Win2000 or later
2.) Make sure your motherboard supports
ACPI S4 state.
2.) Make sure hibernation is enabled in Windows. Go to, ControlPanel>PowerOptions and in the 'Hibernation' tab, check the 'Enable hibernation' checkbox.
Enter the Coder:
Open the project in VB and run it. Press the 'Test' button.
If everything is ok, your system will go to Hibernation. Don't turn off power. Your system will wake up automatically after 2 minutes.
If your system doesn't wake up within 3-4 minutes, press the power button of your computer.
Note: Hibernation is very much OS/Motherboard/DeviceDriver dependent. Make sure Windows can hibernate your computer perfectly. Save all work before testing.
How it works ?
Basically I have done nothing but merging the following codes:
How To Use SetWaitableTimer With Visual Basic
SetSystemPowerState
SetSystemPowerState initiates a hibernation and just then, CreateWaitableTimer and SetWaitableTimer creates and sets a waitable timer with passing True to the fResume parameter. When the timer event fires, Windows automatically wakes-up.
In addition, I have subclassed the form. When Windows or any other program tries to suspend the system, I'm discarding the operation and initiating my own Hibernate&WakeUp routine. (Will be useful if we keep it running in background or in systray. In v2.0 may be.

)
End Sub:
I have tested this code on Windows 2003 Server and it is working ok.
Special thanks to
fahad k for testing this code.
This is my first codebank submission. Please feel free to comment or slap me.
