Desktop working area resize

Windows specific forum
BarryG
Addict
Addict
Posts: 3294
Joined: Thu Apr 18, 2019 8:17 am

Desktop working area resize

Post by BarryG »

On Windows, I'm using the following code to resize the desktop working area to smaller than it usually is (1024x768), and it's always worked okay in the past, but now any maximized windows that I restore and then re-maximize, don't fill the new space anymore; they keep re-maximizing to the old space (1920x1080).

However, if I open a new window (like Notepad), and maximize that, it does fill the new space, but then suddenly all the others do too, even though they didn't before I opened Notepad. So... what the?

My question is (obviously) how can I make sure that all the existing windows respect the new size with making the user open Notepad and maximizing it? Thanks.

Code: Select all

; My desktop is normally 1920 x 1080 size.

With NewDesktopSize.RECT
  \left=0
  \top=0
  \right=1024
  \bottom=768
EndWith

SystemParametersInfo_(#SPI_SETWORKAREA,0,NewDesktopSize,0)
Last edited by BarryG on Mon Jun 13, 2022 10:39 am, edited 1 time in total.
User avatar
Kiffi
Addict
Addict
Posts: 1353
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: Desktop working area resize

Post by Kiffi »

Hygge
BarryG
Addict
Addict
Posts: 3294
Joined: Thu Apr 18, 2019 8:17 am

Re: Desktop working area resize

Post by BarryG »

Thanks, Kiffi. I do use Windows 10. And they say it's by design now? Damn Microsoft!
Post Reply