Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to get a legacy VB6/C++ application to work on Windows 7. The application can't handle "Windows 7 Sleep"; if Windows 7 is put to sleep and is woken up again then the application stops working.

I would be home free if I could close the application when Windows 7 goes to sleep and re-launch the application when Windows 7 is woken up again. (I don't need to store any state between application runs). Is there a way to do this?

share|improve this question
    
What do you mean by "stops working", does it crash? Can you include the crash dump in that case and show us the stack? –  Tom Wijsman Apr 5 '11 at 14:25
add comment

migrated from stackoverflow.com Apr 5 '11 at 13:59

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 1 down vote accepted

One option is to process OS events and the .NET equivalent is a PowerModeChanged event.

Another option is to schedule tasks with the Task Manager to trigger on the sleep and resume events...

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.