mlowery Posted January 3, 2009 Share Posted January 3, 2009 (edited) I've got a small script that processes files and displays a status GUI for a couple of seconds when each file is complete. If I'm using the computer when this script gets called, these status windows -- displayed with GUISetState(@SW_SHOW) -- keep popping up on top of what I'm working on, stealing focus and covering up what I'm working on.Is there a way to make these GUIs appear behind open/active windows? So that if I'm looking at the desktop with minimized or inactive windows I can see them, but they won't cover my current active window? Something like the opposite of $WS_EX_TOPMOST, I guess.SOLUTIONDigging around in the help file, I found _WinAPI_SetWindowPos, and found the combination of flags using the information on the MSDN site linked from the help. Works perfectly!#Include <WinAPI.au3> #include <Constants.au3> $hwnd = GUICreate("title",200,100) $pos = WinGetPos($hwnd) _WinAPI_SetWindowPos($hwnd, $HWND_BOTTOM, $pos[0], $pos[1], $pos[2], $pos[3], BitOR($SWP_SHOWWINDOW, $SWP_NOACTIVATE)) Sleep(5000) Exit Edited January 3, 2009 by mlowery Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now