Jam00: hier hast Du ein Beispiel:
Spoiler anzeigen
#include <ProgressConstants.au3>
#include <GUIConstantsEx.au3>
Opt('GUIOnEventMode', 1)
$hGui = GUICreate('Test', 130, 100)
GUISetOnEvent($GUI_EVENT_CLOSE, 'Ende')
GUISetOnEvent($GUI_EVENT_PRIMARYUP, '_SetPos')
$ProgressWidth = 120
$Left = 5
DllCall('uxtheme.dll', 'none', 'SetThemeAppProperties', 'int', 0) ; auf den klassischen Style umschalten
$hProgress = GUICtrlCreateProgress($Left, 20, $ProgressWidth, 20, $PBS_SMOOTH)
GUICtrlSetBkColor(-1, 0xEEEEEE)
GUICtrlSetColor(-1, 0xEE8822)
DllCall('uxtheme.dll', 'none', 'SetThemeAppProperties', 'int', 7) ; zurück zum Standard-Windowsstyle
$hLabel = GUICtrlCreateLabel('', 55, 50, 50, 20)
GUISetState()
While True
Sleep(50)
WEnd
Func Ende()
Exit
EndFunc ;==>Ende
Func _SetPos()
Local $aInfo = GUIGetCursorInfo($hGui)
If $aInfo[4] <> $hProgress Then Return $GUI_RUNDEFMSG
Local $Percent = Int(100 / $ProgressWidth * ($aInfo[0] - $Left))
GUICtrlSetData($hProgress, $Percent)
GUICtrlSetData($hLabel, $Percent & '%')
EndFunc ;==>_SetPos