we are usually working using laptops and external 1 or 2 monitors, such we have 1-3 monitors. Sometimes (e.g. when removing the laptop from the docking station), the number of monitors changes during a running MATLAB session. We need to position a number of figures and need the monitor positions at the current time for this. However,
get(0, 'MonitorPositions' )
seems to always return the monitor configuration at the time MATLAB was started.
We already tried to implement a workaround using Java (java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment ...) but we don't get the correct positions via this way when Windows Scaling (125% or 150%) ist used.
Is there any way to always get the correct monitor position, even with windos scaling and changing monitor positions during a running MATLAB session?