Jump to content

[Solved] All windows taken off WinSetOnTop

Recommended Posts


I'm wondering if there is a way to remove all windows with the status set on top? 

I know this can be easily done if you know the title or have the window as an active window, but I'm wondering if there is something that will apply to all windows at once to remove this status?


Edited by AnonymousX
Link to comment
Share on other sites

15 hours ago, spudw2k said:

You can try using the WinList function in conjuntion with the _WinAPI_SetWindowPos function.




Thanks that was exactly what I needed. 

For future reference here's the function I used:

HotKeySet("^\", "Toggletop"); toggles window from being set to top
Global $topstatus = 0; determins if a window has been set on top

while true

Func Toggletop()

    if $topstatus== 0 Then;No window is on top
        $hWnd = WinGetHandle("[ACTIVE]")
    Else;A window is on top
        $allwind = WinList()
        For $i=0 to UBound($allwind)-1 step 1

    ;WinSetOnTop($window,"",1);My GUI that I permanently want on top



Link to comment
Share on other sites

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

  • Create New...