PcExpert Posted June 29, 2008 Share Posted June 29, 2008 Hi all, I made a script with a GUI that has the top most attribute enabled. So When I start the program, and I start internet explorer for example, then the gui will always be on top, thats fine. But When you maximize the IE window, a part of the windows will dissapear behind the GUI of my program, So how to maximize till the beginning of the GUI. this is the GUI: $gui_time = GUICreate("Internet Café 2.0", @DesktopWidth, 35, 0, 0, $WS_POPUP, $WS_EX_TOOLWINDOW & $WS_EX_TOPMOST) ; GUISetState(@SW_SHOW, $gui_time) ; will display an empty dialog box So the window must be kept under the GUI when maximized. thanks! I supplied the code so you can see the height and the width of the GUI. Link to comment Share on other sites More sharing options...
martin Posted June 29, 2008 Share Posted June 29, 2008 Hi all, I made a script with a GUI that has the top most attribute enabled. So When I start the program, and I start internet explorer for example, then the gui will always be on top, thats fine. But When you maximize the IE window, a part of the windows will dissapear behind the GUI of my program, So how to maximize till the beginning of the GUI. this is the GUI: $gui_time = GUICreate("Internet Café 2.0", @DesktopWidth, 35, 0, 0, $WS_POPUP, $WS_EX_TOOLWINDOW & $WS_EX_TOPMOST) ; GUISetState(@SW_SHOW, $gui_time) ; will display an empty dialog box So the window must be kept under the GUI when maximized. thanks! I supplied the code so you can see the height and the width of the GUI.Instead of maximizing use WinMove("Internet Explorer","",0,36,@DeskTopWidth,@DeskTopHeight - 36);Not sure what the title is for IE. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
PcExpert Posted June 29, 2008 Author Share Posted June 29, 2008 I'll try to explain better. The GUI has the topmost attribute, so it will be on top of all windows. What I want is that, when any window is maximized, it will stay under the GUI, so not only IE. Thanks! Link to comment Share on other sites More sharing options...
martin Posted June 29, 2008 Share Posted June 29, 2008 I'll try to explain better. The GUI has the topmost attribute, so it will be on top of all windows. What I want is that, when any window is maximized, it will stay under the GUI, so not only IE. Thanks!This might help but I haven't looked at it for a while Const $SPI_SETWORKAREA = 47,$SPI_GETWORKAREA = 48 Const $SPIF_SENDCHANGE = 11 $newWid = @DesktopWidth - 500 $newHt = @DesktopHeight $DtopRect = DllStructCreate("int[4]") DllStructSetData($DtopRect,1,0,1);top DllStructSetData($DtopRect,1,0,2);left DllStructSetData($DtopRect,1,$newWid,3);bottom DllStructSetData($DtopRect,1,$newHt,4);right $PRect = DllStructGetPtr($DtopRect) $DNowRect = DllStructCreate("int[4]") $PNowRect = DllStructGetPtr($DNowRect) $res = DllCall("user32.dll","int","SystemParametersInfo","int",$SPI_SETWORKAREA,"int",0,"ptr",$PRect,"int",$SPIF_SENDCHANGE) MsgBox(0,"somthing might have changed on your desktop","better have a look") $res = DllCall("user32.dll","int","SystemParametersInfo","int",$SPI_GETWORKAREA,"int",0,"ptr",$PNowRect,"int",0) MsgBox(0,'work area is now',DllStructGetData($DNowRect,1,1) & ', ' & DllStructGetData($DNowRect,1,2) & _ ' x ' & DllStructGetData($DNowRect,1,3) & ', ' & DllStructGetData($DNowRect,1,4));right DllStructSetData($DtopRect,1,@DesktopWidth,3);we'll put the working area back to how it was $res = DllCall("user32.dll","int","SystemParametersInfo","int",$SPI_SETWORKAREA,"int",0,"ptr",$PRect,"int",$SPIF_SENDCHANGE) $res = DllCall("user32.dll","int","SystemParametersInfo","int",$SPI_GETWORKAREA,"int",0,"ptr",$PNowRect,"int",0) MsgBox(0,'work area is now',DllStructGetData($DNowRect,1,1) & ', ' & DllStructGetData($DNowRect,1,2) & _ ' x ' & DllStructGetData($DNowRect,1,3) & ', ' & DllStructGetData($DNowRect,1,4));right Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. 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