Massimiliano Posted July 13, 2010 Posted July 13, 2010 Hello, I'm trying to create a software wich is able to manage the Parents gui as an internal windows, and so on.. when minimizing a parent gui it will minimize inside the main gui. Like how mIRC manage their chat windows: (it is a screenshot that I'v got searching on google). Is possibile to make it with autoit? THank you, Best Regards
Mat Posted July 13, 2010 Posted July 13, 2010 Google MDI. Not sure if this is it: http://www.autoitscript.com/forum/index.php?showtopic=94154 AutoIt Project Listing
Moderators Melba23 Posted July 13, 2010 Moderators Posted July 13, 2010 Massimiliano,Is this the sort of thing you are looking for? expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinApi.au3> Global $hMain, $ahChild[1][2] = [[0, 0]], $SC_MOVE = 0xF010 $hMain = GUICreate("Parent Window", 633, 447, 192, 200) GUICtrlCreateLabel("", 0, 0, 0, 0) $mMain = GUICtrlCreateMenu("New") $mChild = GUICtrlCreateMenuItem("Child", $mMain) GUISetState(@SW_SHOW) GUIRegisterMsg($WM_SYSCOMMAND, "On_WM_SYSCOMMAND") While 1 ; Use advance GUIGetMsg to distinguish between windows $aMsg = GUIGetMsg(1) Switch $aMsg[1] ; It is the parent Case $hMain ; Now check the message Switch $aMsg[0] Case $GUI_EVENT_CLOSE Exit Case $mChild CreateChild() EndSwitch ; Must be a child Case Else ; But which one? For $i = 1 To $ahChild[0][0] If $aMsg[1] = $ahChild[$i][0] Then ; Check the message Switch $aMsg[0] Case $GUI_EVENT_CLOSE GUIDelete($ahChild[$i][0]) Case $GUI_EVENT_MAXIMIZE ; Set the Maximised flag $ahChild[$i][1] = True Case $GUI_EVENT_RESTORE ; Clear the Maximised flag $ahChild[$i][1] = False EndSwitch EndIf Next EndSwitch WEnd Func CreateChild() $hNew_Child = GUICreate("Child " & $ahChild[0][0] + 1, 300, 300, 10, 0, BitOR($GUI_SS_DEFAULT_GUI , $WS_MAXIMIZEBOX)) GUISetState() _WinAPI_SetParent($hNew_Child, $hMain) Add($ahChild, $hNew_Child) EndFunc ;==>CreateChild Func Add(ByRef $aArray, $hHandle) ; Increase the number of children $aArray[0][0] += 1 ; Resize the array ReDim $aArray[$aArray[0][0] + 1][2] ; Add the child details $aArray[$aArray[0][0]][0] = $hHandle $aArray[$aArray[0][1]][1] = False EndFunc ;==>Add Func On_WM_SYSCOMMAND($hWnd, $Msg, $wParam, $lParam) For $i = 1 To $ahChild[0][0] ; Does the message come from a child? If $hWnd = $ahChild[$i][0] Then ; Is the child maximised? If $ahChild[$i][1] Then ;Is it a MOVE mesage? If BitAND($wParam, 0xFFF0) = $SC_MOVE Then Return False ExitLoop EndIf EndIf Next Return $GUI_RUNDEFMSG EndFunc ;==>On_WM_SYSCOMMANDThe On_WM_SYSCOMMAND message handle prevents the maximised children from being moved - if that does not worry you it can easily be removed. You can test what happens when it does not intercept the MOVE command by commenting out the GUIRegisterMsg line. I can think of a number of improvements - but this should do as a proof of concept script. Please ask if anything is unclear. 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 Â
Mat Posted July 13, 2010 Posted July 13, 2010 This stops the flashing, and allows you to resize children: Func CreateChild() $hNew_Child = GUICreate("Child " & $ahChild[0][0] + 1, 300, 300, 10, 0, BitOR($GUI_SS_DEFAULT_GUI , $WS_MAXIMIZEBOX, $WS_SIZEBOX)) _WinAPI_SetParent($hNew_Child, $hMain) Add($ahChild, $hNew_Child) GUISetState() EndFunc ;==>CreateChild Is there no MDI UDF? AutoIt Project Listing
Massimiliano Posted July 15, 2010 Author Posted July 15, 2010 Thanks to both! I'm now studing the example code for understand how it work.. and how it create the MainWorkspace and the ChildGui inside it :-) I'm very glad for that big help !!! :-) If I'll have some question about it in the near future, I hope that u two will answer to me ;P Best Regards
Moderators Melba23 Posted July 15, 2010 Moderators Posted July 15, 2010 Massimiliano, Glad we could help. Please do ask any questions you may have. 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 Â
Massimiliano Posted July 21, 2010 Author Posted July 21, 2010 Hello, I'v modified the function wich create the "child" gui, in a manner that it return the GuiID and let me send it to a variable. But, due that the "While" which will manage the Main Gui and Child Gui activity, is one, I need to declare all Gui variables before to run the script, or it will stop due that didnt find a variable. But I got stuck in a bug (or I think it is a bug), if a declare all variable the While starts to think that it is true the returns from the checks and execute the action. There is an example script: #include <GUIConstantsEx.au3> Global $GUI_Login, $GUI_Login_Accedi, $GUI_Login_Annulla, $GUI_Login_username, $GUI_Login_password While 1 $wMsg = GUIGetMsg(1) ; [1] = Window Handle - [0] = Command. Switch $wMsg[1] Case $GUI_Login Switch $wMsg[0] Case $GUI_Login_Accedi MsgBox(0, "Accedi", "clicked wMsg: " & $wMsg[0] & " GUIVar: " & $GUI_Login_Accedi & " GUIWin: " & $wMsg[1]) Case $GUI_Login_Annulla GUIDelete($GUI_Login) EndSwitch EndSwitch WEnd If u run that script, u will get the popup sayng "Accedi" and the status of the vars. Why that happend? For temporally bypass it, I got to declare the variable to something like 9x999999, because if I declare to something else like "NOTHINGHERE" the bug will come again back. THank you for the help:)
Moderators Melba23 Posted July 22, 2010 Moderators Posted July 22, 2010 Massimiliano,If you pre-declare variables used in a conditional structure as you are doing here, you need to set a value to them or the conditional statement always fires for the variable, as you have discovered.You need to set the variable to a dummy value (I always use 9999) to prevent this - so your "temporally bypass" trick is absolutely correct. Remember that if you delete one of your child GUIs, you need to reset the variable holding its handle to 9999 or the Case will start firing again. 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 Â
Massimiliano Posted July 22, 2010 Author Posted July 22, 2010 Melba23, Thank you :-) but it isnt a bug ? due that an empty var, or a var set to a string must not return true on the function, or I'm wrong ? Another question, how may I can create a (normal, not mdi) child gui, wich disallow any request to the Main Window? (like MsgBox(36, "Uscita", "Sei sicuro di voler uscire?", -1, $GUI_Main) do). I'v tryed using GuiSetState(@SW_DISABLE, $GUI_Main), but when I set again GuiSetState(@SW_ENABLE, $GUI_Main) it will minimize the MainGui, I can restore it using GuiSetState(@SW_RESTORE, $Gui_Main) but you see the windows minimize and come back again. I'm getting mad but I'm sure it is possible setting the right GUI Style on the child (or I rember that I'v already saw it), but I'm unable to find out how. Regards
Yoriz Posted July 22, 2010 Posted July 22, 2010 Another question, how may I can create a (normal, not mdi) child gui, wich disallow any request to the Main Window? like MsgBox(36, "Uscita", "Sei sicuro di voler uscire?", -1, $GUI_Main) expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> _ParentGui() Func _ParentGui() Local $hParent = GUICreate("Parent", 300, 300 , -1, -1) Local $hButton = GUICtrlCreateButton("OpenChild", 10, 10) GUISetState() while 1 Local $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $hButton GUISetState(@SW_DISABLE, $hParent) _ChildGui($hParent) EndSwitch WEnd EndFunc Func _ChildGui($hParent) Local $hChild = GUICreate("Parent", 200, 200 , -1, -1, BitOR($WS_CAPTION, $WS_POPUP, $WS_SYSMENU,$WS_CHILD), -1, $hParent) Local $hButton = GUICtrlCreateButton("Close", 10, 10) GUISetState() while 1 Local $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE ExitLoop Case $hButton MsgBox(0, "Child button clicked", "Closing window", 0, $hChild) ExitLoop EndSwitch WEnd GUISetState(@SW_ENABLE, $hParent) WinActivate($hParent) GUIDelete($hChild) EndFunc GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF.
Massimiliano Posted July 23, 2010 Author Posted July 23, 2010 (edited) Ah.. the trick was to activate the windows and enable it, before to delete the child gui It was the only thing that I'vnt tought THanks a lot Yoriz * * * EDIT * * * If I use that sequenze, it will look more natural: GuiSetState(@SW_ENABLE, $hParent) GUIDelete($hChild) WinActivate($hParent) Edit 2: ok I go t to understad that yesterday I was too asleep... due that now testing it (looking at Yoriz testcode), if I set the GuiSetState BEFORE of GuiDelete, it will not minimize the windows -.- So.. the WinActivate is needed? ---- And another question about the MDI child --- I got to see that If I'v a Statusbar inside the main gui, the MDI Child will minimize under the status bar, there is a way for set where to minimize? expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinApi.au3> #include <GuiStatusBar.au3> Global $hMain, $ahChild[1][2] = [[0, 0]], $SC_MOVE = 0xF010 $hMain = GUICreate("Parent Window", 633, 447, 192, 200) GUICtrlCreateLabel("", 0, 0, 0, 0) $mMain = GUICtrlCreateMenu("New") $mChild = GUICtrlCreateMenuItem("Child", $mMain) GUISetState(@SW_SHOW) GUIRegisterMsg($WM_SYSCOMMAND, "On_WM_SYSCOMMAND") $GUI_Main_StatusBar = _GUICtrlStatusBar_Create($hMain) _GUICtrlStatusBar_SetSimple($GUI_Main_StatusBar) _GUICtrlStatusBar_SetText($GUI_Main_StatusBar, "There I'll shown some status information....") _GUICtrlStatusBar_SetMinHeight($GUI_Main_StatusBar, 17) While 1 ; Use advance GUIGetMsg to distinguish between windows $aMsg = GUIGetMsg(1) Switch $aMsg[1] ; It is the parent Case $hMain ; Now check the message Switch $aMsg[0] Case $GUI_EVENT_CLOSE Exit Case $mChild CreateChild() EndSwitch ; Must be a child Case Else ; But which one? For $i = 1 To $ahChild[0][0] If $aMsg[1] = $ahChild[$i][0] Then ; Check the message Switch $aMsg[0] Case $GUI_EVENT_CLOSE GUIDelete($ahChild[$i][0]) Case $GUI_EVENT_MAXIMIZE ; Set the Maximised flag $ahChild[$i][1] = True Case $GUI_EVENT_RESTORE ; Clear the Maximised flag $ahChild[$i][1] = False EndSwitch EndIf Next EndSwitch WEnd Func CreateChild() $hNew_Child = GUICreate("Child " & $ahChild[0][0] + 1, 300, 300, 10, 0, BitOR($GUI_SS_DEFAULT_GUI , $WS_MAXIMIZEBOX)) _WinAPI_SetParent($hNew_Child, $hMain) Add($ahChild, $hNew_Child) GUISetState() EndFunc ;==>CreateChild Func Add(ByRef $aArray, $hHandle) ; Increase the number of children $aArray[0][0] += 1 ; Resize the array ReDim $aArray[$aArray[0][0] + 1][2] ; Add the child details $aArray[$aArray[0][0]][0] = $hHandle $aArray[$aArray[0][1]][1] = False EndFunc ;==>Add Func On_WM_SYSCOMMAND($hWnd, $Msg, $wParam, $lParam) For $i = 1 To $ahChild[0][0] ; Does the message come from a child? If $hWnd = $ahChild[$i][0] Then ; Is the child maximised? If $ahChild[$i][1] Then ;Is it a MOVE mesage? If BitAND($wParam, 0xFFF0) = $SC_MOVE Then Return False ExitLoop EndIf EndIf Next Return $GUI_RUNDEFMSG EndFunc ;==>On_WM_SYSCOMMAND Edited July 23, 2010 by Massimiliano
Moderators Melba23 Posted July 23, 2010 Moderators Posted July 23, 2010 Massimiliano, I do not think you can change the initial position, but you can move the window once it is minimised: expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinApi.au3> #include <GuiStatusBar.au3> Global $hMain, $ahChild[1][2] = [[0, 0]], $SC_MOVE = 0xF010, $tPoint = DllStructCreate("int X;int Y") $hMain = GUICreate("Parent Window", 633, 447, 192, 200) GUICtrlCreateLabel("", 0, 0, 0, 0) $mMain = GUICtrlCreateMenu("New") $mChild = GUICtrlCreateMenuItem("Child", $mMain) GUISetState(@SW_SHOW) GUIRegisterMsg($WM_SYSCOMMAND, "On_WM_SYSCOMMAND") $GUI_Main_StatusBar = _GUICtrlStatusBar_Create($hMain) _GUICtrlStatusBar_SetSimple($GUI_Main_StatusBar) _GUICtrlStatusBar_SetText($GUI_Main_StatusBar, "There I'll shown some status information....") _GUICtrlStatusBar_SetMinHeight($GUI_Main_StatusBar, 17) While 1 ; Use advance GUIGetMsg to distinguish between windows $aMsg = GUIGetMsg(1) Switch $aMsg[1] ; It is the parent Case $hMain ; Now check the message Switch $aMsg[0] Case $GUI_EVENT_CLOSE Exit Case $mChild CreateChild() EndSwitch ; Must be a child Case Else ; But which one? For $i = 1 To $ahChild[0][0] If $aMsg[1] = $ahChild[$i][0] Then ; Check the message Switch $aMsg[0] Case $GUI_EVENT_CLOSE GUIDelete($ahChild[$i][0]) Case $GUI_EVENT_MAXIMIZE ; Set the Maximised flag $ahChild[$i][1] = True Case $GUI_EVENT_MINIMIZE ; Clear the Maximised flag $ahChild[$i][1] = False $aPos = WinGetPos($ahChild[$i][0]) DllStructSetData($tPoint, "X", $aPos[0]) DllStructSetData($tPoint, "Y", $aPos[1]) _WinAPI_ScreenToClient($hMain, $tPoint) $iX = DllStructGetData($tpoint, "X") $iY = DllStructGetData($tpoint, "Y") - 23 WinMove($ahChild[$i][0], "", $iX, $iY) Case $GUI_EVENT_RESTORE ; Clear the Maximised flag $ahChild[$i][1] = False EndSwitch EndIf Next EndSwitch WEnd Func CreateChild() $hNew_Child = GUICreate("Child " & $ahChild[0][0] + 1, 300, 300, 10, 0, BitOR($GUI_SS_DEFAULT_GUI , $WS_MAXIMIZEBOX)) _WinAPI_SetParent($hNew_Child, $hMain) Add($ahChild, $hNew_Child) GUISetState() EndFunc ;==>CreateChild Func Add(ByRef $aArray, $hHandle) ; Increase the number of children $aArray[0][0] += 1 ; Resize the array ReDim $aArray[$aArray[0][0] + 1][2] ; Add the child details $aArray[$aArray[0][0]][0] = $hHandle $aArray[$aArray[0][1]][1] = False EndFunc ;==>Add Func On_WM_SYSCOMMAND($hWnd, $Msg, $wParam, $lParam) For $i = 1 To $ahChild[0][0] ; Does the message come from a child? If $hWnd = $ahChild[$i][0] Then ; Is the child maximised? If $ahChild[$i][1] Then ;Is it a MOVE mesage? If BitAND($wParam, 0xFFF0) = $SC_MOVE Then Return False ExitLoop EndIf EndIf Next Return $GUI_RUNDEFMSG EndFunc ;==>On_WM_SYSCOMMAND I will let you work out how it is done! 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 Â
Massimiliano Posted July 28, 2010 Author Posted July 28, 2010 (edited) Massimiliano,I do not think you can change the initial position, but you can move the window once it is minimised: --- CUT ---I will let you work out how it is done! M23Hi M23,I got only today the time for give a look to your example code Yeah I'v tested it and I'v understand how it work,U create a DllStructure and convert it from the "Screen coordinate" to "Client Coordinate" trought WinApi SCreenToClient.The next step is to get data, and send it to WinMove. It is a very simple way instead of what I'v tought to do (a Trasparent gui inside the main gui, and create all mdichild inside the trapsarent gui).I'v two question (just for understand how things work):1 - Why a GuiControl is needed for let the MDI work as aspected ? If u comment the Label and statusbar, when u create a child it lock the Main gui, for get focus again in the maingui u must minimize the child.2 - For what is needed the WM_SYSCOMMAND ? I'v commented it out, but I didnt see any difference.Btw, Thanks for the help ur guys are giving to me! :-)Regards(and I hope that thread will be usefull for someone like me that what to understand how to play with a GUI and MDI GUI) Edited July 28, 2010 by Massimiliano
Moderators Melba23 Posted July 28, 2010 Moderators Posted July 28, 2010 Massimiliano, I'v understand how it workCorrect! If u comment the Label [...] for get focus again in the maingui u must minimize the childI have absolutely no idea! I will try and find out and get back to you. By the way, it is only the label that causes the problem - the status bar has no effect when I comment it out. For what is needed the WM_SYSCOMMAND?You did not read my earlier post #3 carefully enough: "The On_WM_SYSCOMMAND message handler prevents the maximised children from being moved - if that does not worry you it can easily be removed. You can test what happens when it does not intercept the MOVE command by commenting out the GUIRegisterMsg line." If you leave out the GUIRegisterMsg line, you can move the maximised child - and your status bar goes all funny! All clear? 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 Â
Massimiliano Posted July 29, 2010 Author Posted July 29, 2010 I have absolutely no idea! I will try and find out and get back to you. By the way, it is only the label that causes the problem - the status bar has no effect when I comment it out. If u comment out label and keep the status, it will work well. If u keep commentend label and comment status too it give do weirds thing You did not read my earlier post #3 carefully enough: "The On_WM_SYSCOMMAND message handler prevents the maximised children from being moved - if that does not worry you it can easily be removed. You can test what happens when it does not intercept the MOVE command by commenting out the GUIRegisterMsg line." If you leave out the GUIRegisterMsg line, you can move the maximised child - and your status bar goes all funny! yeah, u'r right The status go all funny anyway.. due if u move the windows on the statusbar u get weird things too I think the simple solution would be to create a little status bar gui inside the Main Gui, in that manner the Child windows will go under the StatusBar gui and u w'll don't care about the weird things (but the Statusbar Gui must be something like ontop). I'v used the WM_SYSCOMMAND for manage the minimize.. there is the code: Func On_WM_SYSCOMMAND($hWnd, $Msg, $wParam, $lParam) if $hWnd <> $GUI_Main Then ; GUI_Main is my Main GUI variable, I'll check if the command didnt come from it. if BitAND($wParam, 0xFFF0) = 0xF020 Then GuiSetState(@SW_MINIMIZE, $hWnd) $aPos = WinGetPos($hWnd) DllStructSetData($tPoint, "X", $aPos[0]) DllStructSetData($tPoint, "Y", $aPos[1]) _WinAPI_ScreenToClient($GUI_Main, $tPoint) $iX = DllStructGetData($tpoint, "X") $iY = DllStructGetData($tpoint, "Y") - 23 WinMove($hWnd, "", $iX, $iY) EndIf EndIf Return $GUI_RUNDEFMSG EndFunc ;==>On_WM_SYSCOMMAND
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