Dans un module Public Const WM_USER = &H400 Public Const PBM_SETBARCOLOR = (WM_USER + 9)
Dans l’évènement qui va bien: If ProgressBar1.Value >= ProgressBar1.Max / 3 Then SendMessage ProgressBar1.hwnd, PBM_SETBARCOLOR, 0, ByVal vbRed Else SendMessage ProgressBar1.hwnd, PBM_SETBARCOLOR, 0, ByVal vbGreen End If