luebbe 26 Posted July 1, 2021 Hi Folks, I have a strange bug when a VCL styled application is maximized in a dual monitor configuration. Steps to reproduce: 1. Set your windows task bar position to "top" 2. Create a minimal application and activate a VCL style (add a main menu if you like) 3. Run the application and: * maximize it on the primary monitor (fine) * maximize it on the secondary monitor (The top part of the application, probably the height of the windows task bar, becomes transparent) left: maximized on primary monitor right: maximized on secondary monitor Additional Info: * My two monitors have different resolutions and they have a vertical offset * This bug doesn't seem to affect many people (no customer has reported it so far ;-)) * This is not a new bug. I've seen for years (three to four) it in several Delphi versions, but I can't put a date on it Today I tried to find out if it is a problem with our main form's settings, but since it also happens with a minimal application, it probably isn't. Has anybody encountered this as well? Does anyone know how to fix it? Do I have to wait for Emba to fix it? Cheers & thanks Lübbe Share this post Link to post
Lars Fosdal 1792 Posted July 1, 2021 Do the two screens have different DPI? What kind of HighDPI settings do you have in the manifest? Share this post Link to post
luebbe 26 Posted July 1, 2021 (edited) I didn't touch anything knowingly in the manifest. Just dropped a menu on the form and activated a VCL style. The minimal app has "per monitor v2" Our standard app has "none" So I guess it doesn't have anything to do with dpi awareness? Edited July 1, 2021 by luebbe Share this post Link to post
Lars Fosdal 1792 Posted July 2, 2021 Can you zip the project and attach the minimal app source here so that I can try your exact experiment on my two screen solutiuon? I have two 4k screens, but of different size, and the smaller has a different scaling. Share this post Link to post
luebbe 26 Posted July 2, 2021 Good morning Lars, Thank you. Here it is. Maximized.zip Share this post Link to post
Lars Fosdal 1792 Posted July 2, 2021 I cannot replicate your problem on first try. Menu and title bar looks ok maximized on both screens. The size of the window adjusts according to DPI as I drag it from one screen to the other. Share this post Link to post
Lars Fosdal 1792 Posted July 2, 2021 Also tried resizing the size of one monitor and aligning it to the top, as well as to the bottom. No unexpected size effects. Are you sure you are not running some Windows video driver software that manages windows? Share this post Link to post
dwrbudr 8 Posted July 2, 2021 (edited) I can reproduce the issue. The main thing here is that the monitors should not be aligned. The bug is already reported, but nobody seems to care: https://quality.embarcadero.com/browse/RSP-27207 Edited July 2, 2021 by dwrbudr 1 Share this post Link to post
luebbe 26 Posted July 5, 2021 I was half fearing @lars' answer :) Thanks to @dwrbudr for confirming it. This is my monitor setup with (1) being the laptop monitor as secondary screen and (2) the desktop monitor as primary screen. Share this post Link to post
Lars Fosdal 1792 Posted July 5, 2021 I didn't try that offset config. I always aligned the top or the bottom edges? Share this post Link to post
Lars Fosdal 1792 Posted July 5, 2021 Ok, I tried with the vertical offsets as well. No change. Maximized perfectly - even when spanning both displays. I suspect driver antics? What are the resolutions and scaling of monitor 1 and 2 ? Share this post Link to post
luebbe 26 Posted July 13, 2021 (edited) Sorry for the late reply. It was a very busy week. Monitor 1: 1920x1080 (??" Laptop screen) Monitor 2: 2560x1440 (27") Both set to 100% font scaling It also happens on my desktop PC at work, which has two 24" monitors with different resolutions Monitor 1: 2560x1440 (24") Monitor 2: 1920x1080 (24") Both set to 100% font scaling They have a slight vertical offset IIRC (working from home, desktop is in the office) May be driver antics, but our IT department keeps everything as up-to-date as possible. I'll compile it with the community edition on my home PC and try what happens there. Edited July 13, 2021 by luebbe Share this post Link to post
luebbe 26 Posted July 13, 2021 (edited) Yes, immediately reproducible on my home PC Screen layout: Monitor 1: 1920x1080 (24") Monitor 2: 2560x1440 (27") When both monitors align at the top, everything is fine. This is also sufficient. You have to toggle the app between normal and maximized mode after you change the screen alignment. If you leave the app maximized while changing the screen alignment, everything will stay ok. Edited July 13, 2021 by luebbe Share this post Link to post
Lars Fosdal 1792 Posted July 13, 2021 Still unable to reproduce (10.4.2). Share this post Link to post
luebbe 26 Posted July 13, 2021 (edited) Lucky you 😉 10.4.2 + all patches (work laptop) 10.4.1 + all patches (work desktop) 10.3.x community edition (home) Edited July 13, 2021 by luebbe Share this post Link to post