Jump to content
ULIK

Bugs on maximized windows and different scaled multiple monitors

Recommended Posts

Hi,

 

Delphi XE11.1 on a current Windows 10 system: I have a bunch of problems when moving a maximized windows between monitors of different scales:

- regular size changes

- depending on border style setting, application behaves different

 

Steps to reproduce:

- compile attached application perMonitorV2 aware

- set up multiple monitors:

  * M1 100% 2560x1440 (primary)

  * M2 200% 3840 x 2160

  * M1 left of M2

 

1. problem:

- run app on M1

- maximize window

- send it to second monitor using WIN + Shift + Arrow right

- send it back to first monitor

- change back maximized state

--> size of regular window has changed

 

2. problem

- modify the app and remove comments to set the BorderStyles:

  if cbToggleFullscreen.Checked then
  begin
    BorderStyle := bsNone;
    WindowState := wsMaximized;
  end
  else
  begin
    WindowState := wsNormal;
    BorderStyle := bsSizeable;
  end;

- again run on M1

- click check box (to maximize and set the border style)

- send it to second monitor using WIN + Shift + Arrow right

--> this does not work the first time and you have to do it again to move the window to second screen! ????

- send it to second monitor using WIN + Shift + Arrow right  (second time)

--> now the app is on second screen but no longer maximized

 

3. Problem (related to second)

- start app from problem (2) say on M2

Snag_578d93f.thumb.png.074bdf4a3a66b88771a89413802cb2fe.png

- click check box to maximize and change the border style

- change DPI scaling for M2

- click check box again to get normal sized window: size has changed!

Snag_578eb21.thumb.png.467c1ed0bf84802f118ac23c5b1b74fd.png

 

Problem 3 seems to depend on BorderStyle change. If I test it with original app, the size persists.

Can someone confirm that problems? And is there a solution for it, especially for the second/third?

 

Thank you,

Uli

 

TestDPIFullscreen.zip

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×