DW1 Posted April 18, 2007 Share Posted April 18, 2007 my gui starts like this $parent = GUICreate("whatever", 287, 382, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS), $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST) It stays on top.... usualy. I have a program that pops up when an individual calls in via VOIP. Whenever that program pops up to the top, it covers up my GUI. How can I keep my GUI as the TOPMOST even in this case? AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Zedna Posted April 18, 2007 Share Posted April 18, 2007 If there are more "stay on top" windows then last one created/opened is ON TOP over others on top windows. You must: - remove always on top style from another windows (by some AdLib) or invoke BringToFont for your window - or catch some global event when windows are created/ioened and do some BringToFont Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
DW1 Posted April 18, 2007 Author Share Posted April 18, 2007 Awesome, thank you. Does BringToFont focus the windows as well or just... well... do what it says "BringToFont"? Thanks again for the speedy response. AutoIt3 Online Help Link to comment Share on other sites More sharing options...
DW1 Posted April 18, 2007 Author Share Posted April 18, 2007 (edited) I cannot seem to find anything in the help about BringToFont what is BringToFont and how can I use it in my script? The window covering up mine is NOT a stay ontop window. It just seems to pop to the front. It doesn't stay infront, and if I click my GUI and then go back to the application that is covering it, my GUI is on top and everything works properly. Edited April 18, 2007 by danwilli AutoIt3 Online Help Link to comment Share on other sites More sharing options...
smashly Posted April 18, 2007 Share Posted April 18, 2007 (edited) The function your looking for WinSetOnTop($parent, "", 1) Edited April 18, 2007 by smashly Link to comment Share on other sites More sharing options...
Zedna Posted April 18, 2007 Share Posted April 18, 2007 (edited) I think you should setup your window to "top of Z-order" --> $HWND_TOPMOST + $HWND_TOPSetWindowPos($Form1, $HWND_TOPMOST + $HWND_TOP, 0, 0, 0, 0, BitOR($SWP_NOMOVE,$SWP_NOSIZE)) Func SetWindowPos($hwnd, $InsertHwnd, $X, $Y, $cX, $cY, $uFlags) $ret = DllCall("user32.dll", "long", "SetWindowPos", "hwnd", $hwnd, "hwnd", $InsertHwnd, _ "int", $X, "int", $Y, "int", $cX, "int", $cY, "long", $uFlags) Return $ret[0] EndFuncLook at MSDN for details Edited April 18, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
DW1 Posted April 18, 2007 Author Share Posted April 18, 2007 a HUGE thanks to both of you. Both examples will work correctly. Problem solved AutoIt3 Online Help 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