Are you talking about the DPI change, screen rotation, changing the size of the screen from 1920xN to 1440XN for example?
My Remote Desktop session is set to 1280x1024. I often connect to systems with 1024x768 displays. I might also use a session from my 4k screen. Imagine I move the window on my 4k screen to the right half. Then I release the session to someone using the PC locally. The window is way off the right edge of their screen. The same would happen if I closed the app with the window off to the right and they started the app.
So I need two things: One is to move the window from its persisted location back onto the smaller display, potentially resizing to fit. Second, when a user using a smaller screen takes control, I need to intercept some event and bring the window back onto the now smaller display.
The first part I could do with explicit code, but I'm wondering if there's something in the library that can already do this. For the second part I just need to know if there's an event to intercept when the screen changes between local and remote. Or even someone plugging a different monitor in.
This won't happen, the code restoring window geometry checks for this
Oh good. (Still reviewing that code to see what it does.) That
looks like it handles when the window is created, such as on a
subsequent run of the app. but what about if the app is already
running when the resolution changes? I see an event for DPI
changes, but some googling suggests it only works with Win10, and
I fear I might have a Win7 box somewhere. All I really need is an
event to tell me when the session changed hands. Does something
like that exist?
Sorry, I'm still not sure why do you need these events in the first place: don't you get the usual display size/resolution change events?
Which events are those?