Sign in to follow this  
Followers 0
Guest cb

Transparent GUI and buttons bug

3 posts in this topic

#include <GUIConstants.au3>

opt("GUICloseOnESC",1)

Trying to make a GUI where areas of form is transparent (masked with a picture). I've used the example from help manual on GUICreate. The transparancy thing works but the button I've added doesn't. It doesn't react on mouse actions, but only keyboard. I've also tried to swap GUICtrlCreateButton and GUICtrlCreatePic which does work, but the button doesn't show until the mouse hovers over.

What is missing here or is this a bug?

Added test.gif as an attachment.

Thanks,

cb

CODE
$gui=GUICreate("test")

$pic=GUICreate("", 393, 213, 0, 0,$WS_POPUP,$WS_EX_LAYERED+$WS_EX_MDICHILD,$gui)

GUICtrlCreatePic ("test.gif", 0, 0, 393, 213)

$ExitID = GUICtrlCreateButton("Exit", 300, 175, 75, 25)

GUISetState()

Do

$msg = GUIGetMsg()

Select

Case $msg= $ExitID

; MsgBox(0,"You clicked on", "Exit")

EndSelect

Until $msg = $GUI_EVENT_CLOSE or $msg = $ExitID

post-0-1169641778_thumb.gif

Share this post


Link to post
Share on other sites



You need to disable the picture to stop messages from it.

#include <GUIConstants.au3>

$gui=GUICreate("test")
$pic=GUICreate("", 393, 213, 0, 0,$WS_POPUP,$WS_EX_LAYERED+$WS_EX_MDICHILD,$gui)
$ctrl = GUICtrlCreatePic ("test.gif", 0, 0, 393, 213)
GUICtrlSetState($ctrl, $GUI_DISABLE)
$ExitID = GUICtrlCreateButton("Exit", 300, 175, 75, 25)

GUISetState()

Do
$msg = GUIGetMsg()

Select
Case $msg= $ExitID
;~  MsgBox(0,"You clicked on", "Exit")
EndSelect
Until $msg = $GUI_EVENT_CLOSE or $msg = $ExitID

Share this post


Link to post
Share on other sites

Thanks, it now works!

You need to disable the picture to stop messages from it.

#include <GUIConstants.au3>

$gui=GUICreate("test")
$pic=GUICreate("", 393, 213, 0, 0,$WS_POPUP,$WS_EX_LAYERED+$WS_EX_MDICHILD,$gui)
$ctrl = GUICtrlCreatePic ("test.gif", 0, 0, 393, 213)
GUICtrlSetState($ctrl, $GUI_DISABLE)
$ExitID = GUICtrlCreateButton("Exit", 300, 175, 75, 25)

GUISetState()

Do
$msg = GUIGetMsg()

Select
Case $msg= $ExitID
;~  MsgBox(0,"You clicked on", "Exit")
EndSelect
Until $msg = $GUI_EVENT_CLOSE or $msg = $ExitID

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0