views:

252

answers:

2

I'm trying to make an alarm clock. When the computer is in sleep mode, when the alarm is triggered i want the computer to wake up and play the alarm. Can tell me how to do this in vb 2008.

+1  A: 

As far as I know, this cannot be done. "Sleep mode" (ACPI S3) is a hardware power state, and software instructions are not executed while a computer is in the S3 state. To wake the machine, you will have to schedule an interrupt from the hardware's Real-Time Clock; not all RTCs support waking the machine from S3 via interrupts, so this may be completely impossible on your machine. Even if your RTC is capable of doing this, it does not appear that Visual Basic provides an appropriate interface to the hardware; you will probably require a lower-level language (C or even assembly) to access these features.

kquinn
+4  A: 

Have a look here to see if this fits your needs? This article explains how to wake up a computer from standby or hibernation.

Hope this helps, Best regards, Tom.

tommieb75