How to disable sleep mode programmatically

raguilar1

New member
Local time
10:39 PM
Messages
1
I have a vb.net application that runs for several hours. The problem I am having is that Windows 7 goes to sleep while my application is running. I know I can manually disable the sleep mode, but I am hoping there is a way I can enable/disable the sleep mode from within my vb.net application. That way I can disable the sleep mode when my program starts and I can enable it again when my program finishes. Is there a way to do this? Is there another way to prevent Windows 7 from going to sleep while my program is still running? Is there a DontGoToSleepBecauseMyProgramIsStillRunning command that I can execute every few minutes to prevent Windows 7 from going to sleep while my program is running?
 

My Computer My Computer

Computer Manufacturer/Model Number
HP
OS
Windows 7
CPU
Intel i7 920, 2.67 GHz
Memory
12 GB
Back
Top