Click here to Skip to main content
15,074,987 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I switch between tv and monitor using a hardware VGAswitch. I wrote an app to automatically reset the proper resolution. Works fine. However apparently the WmiMonitorID class isn't available till after a few minutes after wakeup from S3. I used MS's WMICodeCreator to check, so it's not my code.

But when it finally returns with the monitorinfo the info is that of the last monitor connected when going to S3 state, not the current one active.

Which API function can i use to force reloading of the monitor info? I tried calling winmgmt to reset but that doesn't help.


The only thing that makes it update is to do a ChangeDisplaySettingsEx with NULL values. Go figure.

In order to know if you need to change the display settings you have to change the displaysettings first. Genius.
Updated 26-Oct-10 0:29am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900