Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

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  

 

Posted

   $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.

Posted

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.

 

 

Posted
  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)

 

Posted
  On 2/20/2019 at 12:13 PM, Moist said:

This is what I want:

 

Screenshot_3.jpg.6f163f427a8ce15e8cc023396895e9a8.jpg   --->  Screenshot_4.jpg.97543e9ff2ecced3bb5dc2d45d7eff46.jpg

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

 

Posted
Posted
  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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...