Can Windows Z-order be manipulated (without the GUI)?

Get help with using AutoHotkey and its commands and hotkeys
User avatar
Coldblackice
Posts: 23
Joined: 13 Nov 2013, 14:39

Can Windows Z-order be manipulated (without the GUI)?

20 Sep 2020, 20:44

Years back, I wanted to make a script that could manipulate the Z-ordering of windows in Windows. I wanted to make script function/ability to selectively "push down" or "pull up" any window up or down through the Windows Z-order layers. It would be like if we had the ability to rearrange program windows in the ALT-TAB popup.

Is this possible? And without manually scripting "alt-tabs" via keyboard input?

Where does Windows store the Z-order stack, and can it be manually manipulated without needing a mouse cursor to click windows via GUI?
User avatar
mikeyww
Posts: 1066
Joined: 09 Sep 2014, 18:38

Re: Can Windows Z-order be manipulated (without the GUI)?

21 Sep 2020, 06:15

If needed, one workaround could be to push windows to the bottom. Not exactly what you want, but might help. WinSet

For example, if you have a GUI that lets the user reorder the windows, you can then just push each window to the bottom, in that order, to achieve the effect.
A_AhkUser
Posts: 1147
Joined: 06 Mar 2017, 16:18
GitHub: AAhkUser
Location: France

Re: Can Windows Z-order be manipulated (without the GUI)?

21 Sep 2020, 07:55

Hi
Coldblackice wrote:
20 Sep 2020, 20:44
One other solution is to use the SetWindowPos winAPI function - as demonstrated here by teadrinker.

A_AhkUser
my scripts

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], boiler, kczx3, Qriist and 28 guests