Dazzler Posted July 17, 2012 Posted July 17, 2012 Dear People, I have used a large jpg to cover most of a GUI. Then put a number of labels on top. the GUiGetMsg doesnt acknowledge the labels. if I remove the GUICtrlCreatePic, the labels are detected. I have tried buttons; still no success. How can I put controls on top of a GUICtrlCreatePic and have these controls picked up by GUiGetMsg? Many thanks
Andreik Posted July 17, 2012 Posted July 17, 2012 (edited) You must disable pic control, like in this code: $hMain = GUICreate("Example") $hPic = GUICtrlCreatePic(@WindowsDir & "Coffee Bean.bmp",0,0,400,400) $Label = GUICtrlCreateLabel("This is a label",100,300,200,25,0x01) GUICtrlSetFont($Label,16,800,1) GUICtrlSetBkColor($Label,-2) ; Transparent background $Button = GUICtrlCreateButton("Click Me",100,200,200,50) GUICtrlSetFont($Button,16,800,1) GUICtrlSetState($hPic,128) ; Disable Pic control GUISetState(@SW_SHOW) While True Switch GUIGetMsg() Case $Button GUICtrlSetData($Label,"Button was clicked") Case -3 Exit EndSwitch Sleep(10) WEnd Edited July 17, 2012 by Andreik
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