Currently I have a timer that runs to detect if the monitor configuration of the machine has changed (resolution, number of display, position of displays etc…) while my app is open.
Is there an event trigger for something like this? Or any other way I could do it without timers?
My app utilizes extended desktop. Many times the user starts the app on their laptop, then connects to a monitor or projector. And they usually do it in that order.
[quote=198598:@Adam Meyer]Currently I have a timer that runs to detect if the monitor configuration of the machine has changed (resolution, number of display, position of displays etc…) while my app is open.
Is there an event trigger for something like this? [/quote]
On Mac Window Resized fires when resolution changes. Then all you need to do if the window size has not changed its up to you to check the parameters you listed.
On Windows Resized does not fire, but Moved is triggered when resolution changes.
[quote=198710:@Michel Bujardet]If for instance the app window is on Screen(1)
myWindow.Left > Screen(1).Left and myWindow.Left < Screen(1).Left+Screen(1).Width[/quote]
Depending on monitor arrangement, you may also need to check using top and height.
myWindow.Top > Screen(1).Top and myWindow.Top < Screen(1).Top+Screen(1).Height
[quote=198806:@Scott Siegrist]Depending on monitor arrangement, you may also need to check using top and height.
myWindow.Top > Screen(1).Top and myWindow.Top < Screen(1).Top+Screen(1).Height
This seems valid for a screen that would be under screen(0), right ? Would not a Screen(1) above Screen(0) would have Y coordinates in negative since at the topmost of Screen(0) Y = 0 ?