bladem2003 Posted July 5, 2023 Share Posted July 5, 2023 (edited) Hi, I have a gui with a child gui, when I minimize the gui to tray and go with the mouse over the icon only the main gui is visible. Is there a way to see the Main and Child gui? #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> $hGUI = GUICreate("Test", 500, 500, -1, -1) GUISetState() ; Create child GUI $hChild = GUICreate("", 400, 200, 50, 150, $WS_POPUP, $WS_EX_MDICHILD, $hGUI) GUISetBkColor(0xff0000, $hChild) GUICtrlCreateLabel("CHILD", 0, 0, 400, 220, BitOR($SS_CENTER, $SS_CENTERIMAGE)) GUICtrlSetFont(-1, 50) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit WEnd Edited July 5, 2023 by bladem2003 Link to comment Share on other sites More sharing options...
KaFu Posted July 5, 2023 Share Posted July 5, 2023 Spontaneously can't think of an easy way. But why to you need a child GUI at all? What do you want to achieve that can not be done with a label? OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
bladem2003 Posted July 5, 2023 Author Share Posted July 5, 2023 I embed an external application Into the child gui and move It a little bit outside the child gui to hide a part of the external application. Link to comment Share on other sites More sharing options...
Solution KaFu Posted July 5, 2023 Solution Share Posted July 5, 2023 You can do that with labels too. #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WinAPISysWin.au3> Run("notepad.exe","",@SW_HIDE) Local $hWnd = WinWait("[CLASS:Notepad]", "", 10) $hGUI = GUICreate("Test", 500, 500, -1, -1) $c_Label = GUICtrlCreateLabel("CHILD", 50, 150, 400, 220, $WS_CLIPCHILDREN) _WinAPI_SetParent($hWnd, GUICtrlGetHandle($c_Label)) WinMove($hWnd,"",0,0,400,220) GUISetState() WinSetState($hWnd,"",@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit WEnd bladem2003 1 OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
bladem2003 Posted July 5, 2023 Author Share Posted July 5, 2023 1 hour ago, KaFu said: You can do that with labels too. #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WinAPISysWin.au3> Run("notepad.exe","",@SW_HIDE) Local $hWnd = WinWait("[CLASS:Notepad]", "", 10) $hGUI = GUICreate("Test", 500, 500, -1, -1) $c_Label = GUICtrlCreateLabel("CHILD", 50, 150, 400, 220, $WS_CLIPCHILDREN) _WinAPI_SetParent($hWnd, GUICtrlGetHandle($c_Label)) WinMove($hWnd,"",0,0,400,220) GUISetState() WinSetState($hWnd,"",@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit WEnd 👍 thanks for the solution. KaFu 1 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