Mic Posted February 5, 2014 Share Posted February 5, 2014 $cb1 = GUICtrlCreateCheckbox("cb",30,35,18,18,8425760,-1) gives pushbutton-like checkbox. Is there a DLLCall that will change the color of the 'on' to green? At the moment it is blue. tia. Link to comment Share on other sites More sharing options...
JohnOne Posted February 5, 2014 Share Posted February 5, 2014 When you post something like this, you should provide a runnable example code, which can be modified. Otherwise people might not have the time or patience to create a gui themselves, where they would offer help more quickly had they just have to modify existing code, or add a line of code. Doesent appear to work with your style of checkbox, you could just use a button. #include <GUIConstantsEx.au3> Example() Func Example() Local $msg GUICreate("My GUI background color") ; will create a dialog box that when displayed is centered ;$cb1 = GUICtrlCreateCheckbox("cb",30,35,18,18,8425760,-1) $cb1 = GUICtrlCreateButton("cb",30,35,18,18,8425760,-1) GUICtrlSetBkColor($cb1, 0x00ff00) ; Green GUISetState() ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd EndFunc ;==>Example AnonymousX 1 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Mic Posted February 6, 2014 Author Share Posted February 6, 2014 #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <GuiButton.au3> $PtnVsn = GUICreate("PtnVsn",1000,800,-1,-1,-1,-1) ; ISN Studio converts $BS_RIGHT+$BS_CENTER+$WS_BORDER+$BS_VCENTER+$BS_FLAT+$BS_RIGHTBUTTON to 8425760 $cbTest1 = GUICtrlCreateCheckbox("0",445,569,18,18,8425760,-1) ; GUISetState(@SW_SHOW,$PtnVsn) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Chose the checkbox with $BS_PUSHLIKE because it makes a great LED indicator, but I would like the LED on to be green or red. The default blue of the button comes from a default Windows style I think(?). Is it possible to change this? tia. Link to comment Share on other sites More sharing options...
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