Aaron3569 Posted May 20, 2021 Posted May 20, 2021 Hello,  is it possible to change the zorder of GUICtrlCreateGraphic ? $WS_EX_TOPMOST doesnt work 🙂
JockoDundee Posted May 20, 2021 Posted May 20, 2021 Minimal code snippet required.  Aaron3569 1 Code hard, but don’t hard code...
Aaron3569 Posted May 21, 2021 Author Posted May 21, 2021 10 hours ago, JockoDundee said: Minimal code snippet required. Â #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $hParentWindow = GUICreate("Main", 500, 500) GUISetState() GUISwitch($hParentWindow) ;Created bevor Child GUI GUICtrlCreateGraphic(110, 100, 100, 100) GUICtrlSetBkColor(-1, 0xFF0000) $hChildWIndow = GUICreate("Child", 150, 150, 150, 150, $WS_CHILD, -1, $hParentWindow) GUISetBkColor(0x000000) GUISetState() GUISwitch($hParentWindow) ;Created after Child GUI GUICtrlCreateGraphic(230, 100, 100, 100, $WS_EX_TOPMOST) GUICtrlSetBkColor(-1, 0xFF0000) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd as you can see here , i need to find a way to get the Graphic on top of the Child GUI, but it needs to work after the Child GUI is created
pixelsearch Posted May 21, 2021 Posted May 21, 2021 Maybe this way ? #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPISysWin.au3> $hParentWindow = GUICreate("Main", 500, 500) GUISetState() GUISwitch($hParentWindow) ;Created bevor Child GUI GUICtrlCreateGraphic(110, 100, 100, 100) GUICtrlSetBkColor(-1, 0xFF0000) ; red $hChildWIndow = GUICreate("Child", 150, 150, 150, 150, $WS_CHILD, -1, $hParentWindow) GUISetBkColor(0x000000) GUISetState() GUISwitch($hParentWindow) ;Created after Child GUI GUICtrlCreateGraphic(230, 100, 100, 100) GUICtrlSetBkColor(-1, 0x00FF00) ; green _WinAPI_SetWindowPos($hChildWIndow, $HWND_BOTTOM , 0, 0, 0, 0, BitOR($SWP_NOMOVE, $SWP_NOSIZE)) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd  Aaron3569 1 "I think you are searching a bug where there is no bug... don't listen to bad advice."
Aaron3569 Posted May 21, 2021 Author Posted May 21, 2021 42 minutes ago, pixelsearch said: Maybe this way ? #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPISysWin.au3> $hParentWindow = GUICreate("Main", 500, 500) GUISetState() GUISwitch($hParentWindow) ;Created bevor Child GUI GUICtrlCreateGraphic(110, 100, 100, 100) GUICtrlSetBkColor(-1, 0xFF0000) ; red $hChildWIndow = GUICreate("Child", 150, 150, 150, 150, $WS_CHILD, -1, $hParentWindow) GUISetBkColor(0x000000) GUISetState() GUISwitch($hParentWindow) ;Created after Child GUI GUICtrlCreateGraphic(230, 100, 100, 100) GUICtrlSetBkColor(-1, 0x00FF00) ; green _WinAPI_SetWindowPos($hChildWIndow, $HWND_BOTTOM , 0, 0, 0, 0, BitOR($SWP_NOMOVE, $SWP_NOSIZE)) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd  thank you 🙂
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