Progress einfärben

03/26/2011 14:41 V8II#1
Hi,
Gibt es eine Möglichkeit, einen Progress einzufärben (Ich habe gegoogelt und nur eine Möglichkeit gefunden, bei der man in den klassischen Windows-Style wechseln muss, das ist aber total hässlich :( )
Mit GuiCtrlSetColor und GuiCtrlSetBkColor geht es nicht. Ich habe Windows 7.
Ich hoffe jemand kann helfen.
03/26/2011 17:09 omer36#2
meinste den?

PHP Code:
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
XPStyleToggle(1)
$Form1 GUICreate("Form1"652274192124)
$Progress1 GUICtrlCreateProgress(404052933)
GUICtrlSetBkColor(-10x000000)
$Progress2 GUICtrlCreateProgress(4011252933)
GUICtrlSetColor(-10xFF0000)
$Progress3 GUICtrlCreateProgress(4018452933)
GUICtrlSetBkColor(-10x000000)
GUICtrlSetColor(-10xFFFF00)
XPStyleToggle(0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While GUIGetMsg() <> -3
    GUICtrlSetData
($Progress1Random(01001))
    
GUICtrlSetData($Progress2Random(01001))
    
GUICtrlSetData($Progress3Random(01001))
    
Sleep(250)
WEnd


Func XPStyleToggle
($OnOff 1)
    
Local Static $XS_n
    
If Not StringInStr(@OSType"WIN32_NT"Then Return 0
    
If $OnOff Then
        $XS_n 
DllCall("uxtheme.dll""int""GetThemeAppProperties")
        
DllCall("uxtheme.dll""none""SetThemeAppProperties""int"0)
        Return 
1
    
ElseIf IsArray($XS_nThen
        DllCall
("uxtheme.dll""none""SetThemeAppProperties""int"$XS_n[0])
        
$XS_n ""
        
Return 1
    
EndIf
    Return 
0
EndFunc   
;==>XPStyleToggle 
oder hier ein anderes,

PHP Code:

#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 GUICreate("Form1"652274192124)
$Progress1 GUICtrlCreateProgress(404052933)
DllCall('uxtheme.dll''none''SetThemeAppProperties''int'0) ; Classic-Style
$Progress2 
GUICtrlCreateProgress(4011252933)
GUICtrlSetColor(-132250); not working with Windows XP Style
DllCall
('uxtheme.dll''none''SetThemeAppProperties''int'7) ; Standard-Windows-Style
$Progress3 
GUICtrlCreateProgress(4018452933)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###


While GUIGetMsg() <> -3
    GUICtrlSetData
($Progress1Random(01001))
    
GUICtrlSetData($Progress2Random(01001))
    
GUICtrlSetData($Progress3Random(01001))
    
Sleep(250)
WEnd 
03/26/2011 19:11 V8II#3
Danke, du bist ein Genie =)
Beim unteren Beispiel ist er zwar im klassischen Style, dafür sind die anderen beiden normal.