Sign in to follow this  
Followers 0
rotamo

Manually moving a GUI set with $WS_POPUPWINDOW property?

4 posts in this topic

#1 ·  Posted (edited)

I have a GUI with the following parameters:

GUICreate("GUI Name",1279,22,-1,971,$WS_POPUPWINDOW,$WS_EX_TOOLWINDOW)

It's basically a common task bar that launches many repeat functions I do throughout the day, and thus I have it "docked" just above my (non-hiding) task bar. With the given properties, the window real estate is just big enough to show only the buttons and has no title bar. Is there anyway to set it up so that the window can then be dragged elsewhere on one's screen? There are two other users using this and one would like to move it around if possible.

Thanks for any help you can provide.

Edited by rotamo

Share this post


Link to post
Share on other sites



I have a GUI with the following parameters:

GUICreate("GUI Name",1279,22,-1,971,$WS_POPUPWINDOW,$WS_EX_TOOLWINDOW)

It's basically a common task bar that launches many repeat functions I do throughout the day, and thus I have it "docked" just above my (non-hiding) task bar. With the given properties, the window real estate is just big enough to show only the buttons and has no title bar. Is there anyway to set it up so that the window can then be dragged elsewhere on one's screen? There are two other users using this and one would like to move it around if possible.

Thanks for any help you can provide.

One way is to make enough room for a label or a pic say which has the extended style $GUI_WS_EX_PARENTDRAG. If it's a pic you could make it an image with a NSEW arrow design to give a clue as to what it is used for, and set the cursor for it using

GUICtrlSetCursor (-1, 9). You could make a label the same size as the window so that anywhere there is a space between buttons the window can be dragged.


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.

Share this post


Link to post
Share on other sites

Perfect! I cam across the $GUI_WS_EX_PARENTDRAG style before, but applied it to the GUI rather than a control - the result was not desirable.

Using your advice for a label the size of the window, it first covered the buttons I have which rendered them useless, but it dragged like a champ! By changing to two draggable labels across the top & bottom (ea 3 pixels tall), the issue was solved. Thank you very much!

Share this post


Link to post
Share on other sites

Perfect! I cam across the $GUI_WS_EX_PARENTDRAG style before, but applied it to the GUI rather than a control - the result was not desirable.

Using your advice for a label the size of the window, it first covered the buttons I have which rendered them useless, but it dragged like a champ! By changing to two draggable labels across the top & bottom (ea 3 pixels tall), the issue was solved. Thank you very much!

OK.

I forgot to say that to make the buttons show through the label set the label style to include $WS_CLIPSIBLINGS.


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.

Share this post


Link to post
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
Sign in to follow this  
Followers 0