Bonjour, je me suis crée un progressbar circulaire mais mon problème c'est quand il y a deux Ellipse avec GraphicsPath, j'arrive pas a changer de couleur avec les deux ellipses(voir image). comment puis-je faire cela ?

voici en image avec une valeur à 50 % :
Nom : Capture d’écran 2022-01-24 171420.png
Affichages : 565
Taille : 6,3 Ko

voici mon code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Imports System.Drawing.Drawing2D
 
Public Class CirculaireProgressbar : Inherits ProgressBar
 
    Public Sub New()
        Me.SetStyle(ControlStyles.OptimizedDoubleBuffer Or ControlStyles.UserPaint, True)
        Me.Size = New Size(180, 160)
    End Sub
 
    Protected Overrides Sub OnPaint(e As System.Windows.Forms.PaintEventArgs)
        MyBase.OnPaint(e)
        Dim rect As New Rectangle(0, 0, Me.Width, Me.Height)
        Dim g As Graphics = e.Graphics
        g.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias
        Using p As New GraphicsPath
            g.ResetClip()
            p.AddEllipse(New Rectangle(rect.X + 1, rect.Y + 1, rect.Width - 3, rect.Height - 3))
            g.FillPath(New SolidBrush(Color.DodgerBlue), p)
            p.AddEllipse(New Rectangle(CInt(rect.Width / 4), CInt(rect.Height / 4), CInt(rect.Width / 2), CInt(rect.Height / 2)))
            g.DrawPath(New Pen(New SolidBrush(Color.Black), 3), p)
            g.FillPath(Brushes.Blue, p)
            g.SetClip(p, CombineMode.Intersect)
            Dim HeightH As Integer = CInt((rect.Height / (Maximum - Minimum)) * Value)
            g.FillRectangle(New SolidBrush(Color.FromArgb(224, 224, 224)), New Rectangle(rect.X, rect.Height - HeightH, rect.Width, HeightH))
        End Using
        If g Is Nothing Then g.Dispose()
    End Sub
End Class
Pouvez-vous m'aider à résoudre mon problème pour changer de couleur avec les deux ellipses comme image? Merci d'avance