MyEarth Posted November 27, 2015 Share Posted November 27, 2015 I was think if is possible in autoit drag a control outside like Window Info does for "finder tools". Yes i have see there are some script in autoit that want to "replace" info tool but is hard to understand only information about that control and most of the code is uncommented.Thanks for suggestion or examples. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 27, 2015 Moderators Share Posted November 27, 2015 MyEarth,Hint: You can drag a child GUI wherever you wish.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
MyEarth Posted November 27, 2015 Author Share Posted November 27, 2015 I don't havee understood Is not a kind of control? Is a child gui insde a parent gui? And after the drag return to his position? Mmm...no i don't have understood. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 27, 2015 Moderators Share Posted November 27, 2015 MyEarth,A bigger hint:expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <SendMessage.au3> Global Const $SC_DRAGMOVE = 0xF012 $hGUI = GUICreate("Test", 500, 500) GUISetState() $hChild = GUICreate("", 200, 200, 100, 100, BitOr($WS_POPUP, $WS_BORDER), $WS_EX_MDICHILD, $hGUI) GUISetBkColor(0xFFCCCC) GUICtrlCreateLabel("Drag me!", 10, 10, 100, 20) GUISetState() While 1 $aMsg = GUIGetMsg(1) Switch $aMsg[1] Case $hGUI Switch $aMsg[0] Case $GUI_EVENT_CLOSE Exit EndSwitch Case $hChild Switch $aMsg[0] Case $GUI_EVENT_PRIMARYDOWN _SendMessage($hChild, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) $aPos = WinGetPos($hGUI) WinMove($hChild, "", $aPos[0] + 100, $aPos[1] + 100) EndSwitch EndSwitch WEndDo you understand now?M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
mikell Posted November 28, 2015 Share Posted November 28, 2015 Melba,Nice exampleIs there a way to keep the mdi child window visible when clicking on the title bar of the parent gui ? (keep its relative z-order) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 28, 2015 Moderators Share Posted November 28, 2015 mikell,You could use $WS_EX_TOPMOST - or better _WinAPI_SetWindowPos to set the exact Z-order required:$aChildPos = WinGetPos($hChild) _WinAPI_SetWindowPos($hChild, $hGUI, $aChildPos[0], $aChildPos[1], $aChildPos[2], $aChildPos[3], $SWP_SHOWWINDOW) While 1M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
MyEarth Posted November 28, 2015 Author Share Posted November 28, 2015 (edited) MyEarth,A bigger hint. Do you understand now?M23Yes, very near to my request, thanks! But i have a little request to your script I have changed this line:GUICtrlCreateLabel("Drag me!", 10, 10, 100, 20) GUISetState(@SW_SHOWNOACTIVATE) ; <<< Melba look here...Because i don't what the child steal the focus to the window, like a control. But if i drag the item and i release it, the parent lose focus so i have add this:WinMove($hChild, "", $aPos[0] + 100, $aPos[1] + 100) WinActivate($hGUI) ; <<< Melba and look also here...The problem is, the parent get the focus but if i'll try to move again the child i need to click twice, like one to give the focus and the second one to drag. If i'll try to drag at the first click nothing happens, comment out WinActivate and everything work fine but i don't have the focus on the parent. Maybe is a "false problem" and the solution is easy but trust me i'm on this from many time.Thanks again Edited November 28, 2015 by MyEarth 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