tags:

views:

163

answers:

2

Hi All,

I need to run some code when my computer resumes from hibernate (even before I logon). The laptop I am using has a bizzare problem. If I have an external monitor connected to it while resuming from hibernate the laptop chooses the external display as the main video device and the laptop screen remains blank. This becomes more frustrating when sometimes both displays remain blank indefinitely.

I am thinking of writing some code to switch the active display back to the laptop screen when the computer resumes from hibernate. But which windows event do I need to look for to begin with?

The built in hot keys for switching the display have also stopped working. I have reinstalled the OS several times by now and things go smoothly for a few days after that and then its back to square one.

A: 

I think most laptops have issues with that. It is not something they seem to be able to solve in the drivers/ACPI BIOS.

I know Linux allows you to modify the ACPI tables, but I cannot remember if this is possible on Windows.

A Google should provide links to tools you can use to inspect your laptop's ACPI tables in Windows (MS tools IIRC).

leppie
+2  A: 

This article on CodeProject discusses the various Windows messages that relate to power saving events.

Rob Walker