Moist Posted February 20, 2019 Share 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 Link to comment Share on other sites More sharing options...
IAMK Posted February 20, 2019 Share Posted February 20, 2019 Does this help? WinSetTrans($MYGUI, "", 100) Link to comment Share on other sites More sharing options...
Moist Posted February 20, 2019 Author Share Posted February 20, 2019 3 minutes ago, IAMK said: Does this help? WinSetTrans($MYGUI, "", 100) I don't want to turn my window transparent, but rather I want to have something transparent on top of it. Link to comment Share on other sites More sharing options...
rm4453 Posted February 20, 2019 Share Posted February 20, 2019 Are you wanting to disable the controls from being used, while still being visible? Link to comment Share on other sites More sharing options...
Moist Posted February 20, 2019 Author Share 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. Link to comment Share on other sites More sharing options...
rm4453 Posted February 20, 2019 Share Posted February 20, 2019 Can you Please post some example code? 25 minutes ago, 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. Link to comment Share on other sites More sharing options...
Moist Posted February 20, 2019 Author Share 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. Link to comment Share on other sites More sharing options...
rm4453 Posted February 20, 2019 Share 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. Link to comment Share on other sites More sharing options...
rm4453 Posted February 20, 2019 Share Posted February 20, 2019 1 minute ago, 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. 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) Link to comment Share on other sites More sharing options...
Moist Posted February 20, 2019 Author Share Posted February 20, 2019 This is what I want: ---> Link to comment Share on other sites More sharing options...
rm4453 Posted February 20, 2019 Share Posted February 20, 2019 2 minutes ago, Moist said: This is what I want: ---> 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 Link to comment Share on other sites More sharing options...
Nine Posted February 20, 2019 Share 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 Spoiler 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) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Moist Posted February 21, 2019 Author Share Posted February 21, 2019 21 hours ago, 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 That doesn't work so well with my script because I used $WS_EX_TOPMOST on my GUI. 18 hours ago, 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 Thanks, I will try that when I get around to it. Link to comment Share on other sites More sharing options...
Moist Posted February 21, 2019 Author Share Posted February 21, 2019 21 hours ago, 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 Thanks, worked like a charm. 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