Jump to content

Recommended Posts

Posted

Hey guys, may be a simple solution but it's bugging me and I've had no luck as of yet so was wondering if any of you could help me with this one.

I'm attempting to set the font colour on GUICtrlCreateCheckBox..

$save = GUICtrlCreateCheckBox("log me in automatically", 95, 140)
GUICtrlSetColor(-1, 0xffffff)

Only the font colour is continuing to stay black <_<

Any help would be appreciated, thanks.

--

p.s Whilst I'm here, I'm also using an image with the GUICtrlCreatePic function, except any white in the image is becoming transparent!!??!

global $submit = GUICtrlCreatePic(@SystemDir & "\login.gif", 191, 171, 66, 24)

I've also tryed using .jpg format to ensure I wasn't saving any transparency with the .gif image, but no luck again.

Once again, thanks

Posted

This is for Windows XP

#include <GUIConstants.au3>
Dim $XS_n

GUICreate("My GUI Checkbox")  ; will create a dialog box that when displayed is centered
GUISetBkColor(0x000000)
If XPStyle(1) Then MsgBox(0,0,"on", 2)
$checkCN = GUICtrlCreateCheckbox("CHECKBOX 1", 10, 10, 120, 15)
GUICtrlSetColor($checkCN, 0xFF0000)
GUICtrlSetBkColor($checkCN, 0x000000);0xFFFFFF)
If XPStyle(0) Then MsgBox(0,0,"off", 2)
GUISetState()       ; will display an  dialog box with 1 checkbox

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()

    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd

Func XPStyle($OnOff = 1)   
    If $OnOff And StringInStr(@OSTYPE, "WIN32_NT") Then
        $XS_n = DllCall("uxtheme.dll", "int", "GetThemeAppProperties")
        DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0)
        Return 1
    ElseIf StringInStr(@OSTYPE, "WIN32_NT") And IsArray($XS_n) Then
        DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", $XS_n[0])
        $XS_n = ""
        Return 1
    EndIf
    Return 0
EndFunc   ;==>XPStyl

8)

NEWHeader1.png

Posted (edited)

thanks for the help, seems weird how a simple GUISetColor isnt supported for it <_<

Any ideas on the image problem? White on image is becoming transparent and the background behind it is visible :s

Edited by fi3ldy
Posted

I stated in the first post I did already give it a go, but didnt change a thing. I specifically used a JPG knowing it doesnt support transparency at all <_<

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
×
×
  • Create New...