Detect display turning back on?

Windows 7:
My customer complains about windows occasionally being empty. No controls are visible, just the background color.
This happens after the display is turned back on, after having been automatically turned off due to Power Options.
No screen saver is chosen and computer sleeps Never.
Can’t reproduce it myself.

I figure, that a Refresh would correct the windows and I wonder if I could detect such an event.
Having a timer do it repeatedly would cause unnecessary flicker.

In case it matters, my customer uses 2 displays.
And I use RB2011r2 for W.


You could set up a timer to see if the screen is off then if it is, use a timer to see if it’s back on. I’d ask the customer to minimize and then restore to make sure that the problem is refreshing first. You can always use the standard F5 key.

What a weird issue.
I guess you might have to dig into some declares to figure out when Windows sends the display to sleep and re-awakens it. I’d also ask the customer does this happen to others apps? If so then it might be a graphics card (or driver) issue?

I would also suggest downloading a newer version of Xojo and building there. It may be a bug in the RB framework that has been fixed.

Thank you.
@ Jym: Can my program see if the screen is on/off without using declares?