Guest cb Posted January 24, 2007 Posted January 24, 2007 #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
MHz Posted January 24, 2007 Posted January 24, 2007 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
Guest cb Posted January 24, 2007 Posted January 24, 2007 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
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