Moist Posted February 20, 2019 Posted February 20, 2019 Hello guys, How can I create a transparent rectangle over my GUI? I can create a rectangle using the GUICtrlCreateGraphic(), but can I fill it with a transparent color, so all the controls underneath can be semi-seen? Thanks
Moist Posted February 20, 2019 Author Posted February 20, 2019 On 2/20/2019 at 10:48 AM, IAMK said: Does this help? WinSetTrans($MYGUI, "", 100) Expand I don't want to turn my window transparent, but rather I want to have something transparent on top of it.
rm4453 Posted February 20, 2019 Posted February 20, 2019 Are you wanting to disable the controls from being used, while still being visible?
Moist Posted February 20, 2019 Author Posted February 20, 2019 Yeah, And I didn't want to disable them one by one. But I've used GUICtrlCreateLabel over the whole window with a Loading... in the middle and It works great.
rm4453 Posted February 20, 2019 Posted February 20, 2019 Can you Please post some example code? On 2/20/2019 at 11:18 AM, Moist said: Yeah, And I didn't want to disable them one by one. But I've used GUICtrlCreateLabel over the whole window with a Loading... in the middle and It works great. Expand
Moist Posted February 20, 2019 Author Posted February 20, 2019 $label = GUICtrlCreateLabel(" " & @CRLF & @CRLF & @CRLF & " A carregar...", 5, 5, 500, 450) GUICtrlSetFont(-1, 15, 600, $GUI_FONTITALIC, "Arial") _Search_2($num, $check, $thick) WinWait("COMPONENT INTERFACE") GUICtrlDelete($label) The function _search_2() makes somes changes in another software and when a window COMPONENT INTERFACE appears on my other software, I can use my GUI again.
rm4453 Posted February 20, 2019 Posted February 20, 2019 Also have you seen this post yet? Am unsure if it will accomplish what you want / help you along the way however I believe it may be useful to you.
rm4453 Posted February 20, 2019 Posted February 20, 2019 On 2/20/2019 at 11:47 AM, Moist said: $label = GUICtrlCreateLabel(" " & @CRLF & @CRLF & @CRLF & " A carregar...", 5, 5, 500, 450) GUICtrlSetFont(-1, 15, 600, $GUI_FONTITALIC, "Arial") _Search_2($num, $check, $thick) WinWait("COMPONENT INTERFACE") GUICtrlDelete($label) The function _search_2() makes somes changes in another software and when a window COMPONENT INTERFACE appears on my other software, I can use my GUI again. Expand 1 Please Use code tag like this: $label = GUICtrlCreateLabel(" " & @CRLF & @CRLF & @CRLF & " A carregar...", 5, 5, 500, 450) GUICtrlSetFont(-1, 15, 600, $GUI_FONTITALIC, "Arial") _Search_2($num, $check, $thick) WinWait("COMPONENT INTERFACE") GUICtrlDelete($label)
rm4453 Posted February 20, 2019 Posted February 20, 2019 On 2/20/2019 at 12:13 PM, Moist said: This is what I want: ---> Expand Here You GO: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 615, 437, 192, 124) $click = GUICtrlCreateButton("Click Me", 40, 32, 89, 25) $after = GUICtrlCreateButton("Click Me After", 224, 80, 241, 121) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $click $pos = WinGetPos("Form1", "") GUICreate("", $pos[2], $pos[3], $pos[0], $pos[1], $WS_DISABLED) GUISetState(@SW_SHOW) WinSetTrans("", "", 50) Sleep(5000) GUIDelete(WinGetHandle("", "")) EndSwitch WEnd
Nine Posted February 20, 2019 Posted February 20, 2019 you could also use simply : WinSetTrans ($hForm, "", 50) WinSetState ($hForm, "", @SW_DISABLE) Sleep (5000) ; do the things you need to do there WinSetState (h$Form, "", @SW_ENABLE) WinSetTrans ($hForm, "", 255) that will disable and set transparent the whole window. nn to disable each individual controls “They did not know it was impossible, so they did it” ― Mark Twain Reveal hidden contents Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Moist Posted February 21, 2019 Author Posted February 21, 2019 On 2/20/2019 at 12:16 PM, rm4453 said: Here You GO: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 615, 437, 192, 124) $click = GUICtrlCreateButton("Click Me", 40, 32, 89, 25) $after = GUICtrlCreateButton("Click Me After", 224, 80, 241, 121) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $click $pos = WinGetPos("Form1", "") GUICreate("", $pos[2], $pos[3], $pos[0], $pos[1], $WS_DISABLED) GUISetState(@SW_SHOW) WinSetTrans("", "", 50) Sleep(5000) GUIDelete(WinGetHandle("", "")) EndSwitch WEnd Expand That doesn't work so well with my script because I used $WS_EX_TOPMOST on my GUI. On 2/20/2019 at 2:51 PM, Nine said: you could also use simply : WinSetTrans ($hForm, "", 50) WinSetState ($hForm, "", @SW_DISABLE) Sleep (5000) ; do the things you need to do there WinSetState (h$Form, "", @SW_ENABLE) WinSetTrans ($hForm, "", 255) that will disable and set transparent the whole window. nn to disable each individual controls Expand Thanks, I will try that when I get around to it.
Moist Posted February 21, 2019 Author Posted February 21, 2019 On 2/20/2019 at 2:51 PM, Nine said: you could also use simply : WinSetTrans ($hForm, "", 50) WinSetState ($hForm, "", @SW_DISABLE) Sleep (5000) ; do the things you need to do there WinSetState (h$Form, "", @SW_ENABLE) WinSetTrans ($hForm, "", 255) that will disable and set transparent the whole window. nn to disable each individual controls Expand Thanks, worked like a charm.
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