Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <GUIConstants.au3>
- $hGUI = GUICreate("Test-GUI",300,300)
- $hLabel = GUICtrlCreateLabel("",50,50,200,200)
- GUICtrlSetBkColor($hLabel,0xFF0000)
- GUISetState()
- While 1
- $aMsg = GUIGetMsg(1)
- Switch $aMsg[0]
- Case -3
- Exit
- Case $GUI_EVENT_PRIMARYDOWN
- $aCursor = GUIGetCursorInfo()
- If $aCursor[4] = $hLabel Then GUICtrlSetBkColor($hLabel,0x0000FF)
- Case $GUI_EVENT_PRIMARYUP
- $aCursor = GUIGetCursorInfo()
- If $aCursor[4] = $hLabel Then GUICtrlSetBkColor($hLabel,0xFF0000)
- EndSwitch
- WEnd
Add Comment
Please, Sign In to add comment