Xp c'est normal mais pas les autres.
Code : Tout sélectionner
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <SendMessage.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Sh4dows", 480, 352, 219, 167)
$R = GUICtrlCreateProgress(16, 40, 449, 25)
$Label1 = GUICtrlCreateLabel("Rouge :", 16, 16, 49, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$J = GUICtrlCreateProgress(14, 107, 449, 25)
$Label2 = GUICtrlCreateLabel("Jaune :", 14, 83, 46, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$V = GUICtrlCreateProgress(16, 172, 449, 25)
$Label3 = GUICtrlCreateLabel("Vert", 16, 148, 27, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$S = GUICtrlCreateProgress(16, 255, 449, 25)
$Label4 = GUICtrlCreateLabel("Normale :", 16, 231, 58, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("Start", 100, 320, 137, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Stop", 250, 320, 137, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
_Progress_Start($R)
_Progress_Start($J)
_Progress_Start($V)
_Progress_Start($S)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_Progress_Start($R)
_Progress_Start($J)
_Progress_Start($V)
_Progress_Start($S)
EndSwitch
WEnd
Func _Progress_Start($ProgressBar)
If $ProgressBar <> $S Then
;(1 = Vert, 2 = Rouge, 3 = Jaune)
GUICtrlSetStyle($ProgressBar,0x040A)
_SendMessage(GUICtrlGetHandle($ProgressBar), 0x040A, True, 50)
If $ProgressBar = $R Then
;== Rouge ==
_SendMessage(GUICtrlGetHandle($ProgressBar),0x400 + 16, 2,0)
ElseIf $ProgressBar = $J Then
;== Jaune ==
_SendMessage(GUICtrlGetHandle($ProgressBar),0x400 + 16, 3,0)
ElseIf $ProgressBar = $V Then
;== Vert ==
_SendMessage(GUICtrlGetHandle($ProgressBar),0x400 + 16, 1,0)
EndIf
Else
For $i = 1 To 100
$Msg = GUIGetMsg()
If $Msg = $Button2 Then
_Progress_Stop($R)
_Progress_Stop($J)
_Progress_Stop($V)
GUICtrlSetData($ProgressBar, 0)
ExitLoop
EndIf
GUICtrlSetData($ProgressBar, $i)
Sleep(33)
Next
EndIf
EndFunc
Func _Progress_Stop($Progress)
GUICtrlSetStyle($Progress,0)
If $Progress = $R Then
;== Rouge ==
_SendMessage(GUICtrlGetHandle($Progress), 0x040A, False, 0)
ElseIf $Progress = $J Then
;== Jaune ==
_SendMessage(GUICtrlGetHandle($Progress), 0x040A, False, 0)
ElseIf $Progress = $V Then
;== Vert ==
_SendMessage(GUICtrlGetHandle($Progress), 0x040A, False, 0)
EndIf
EndFunc
Les Progress Rouge et Jaune s'actualisent une fois mais rien d'autre ne se passe !!