دوستان من این کد رو پیدا کردم تقریبا شبیه همین چیزی که میخوایمه
Public Class Form1
Dim AreaHeight As Integer
Dim AreaWidth As Integer
Dim NumberOfItems As Integer
Dim DistanceBetweenItems As Integer
Dim ItemLength As Integer
Dim ItemX() As Decimal
Dim ItemIndex As Integer
Dim Bmp As Bitmap
Dim G1 As Graphics
Dim Stage As Integer
Dim dx1 As Integer
Dim dx2 As Decimal
Dim PictureBox1 As PictureBox
Dim WithEvents Timer1 As Timer
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.Size = New Size(235, 95)
Me.Text = "ProgressBar"
Me.Location = New Point(CInt((Screen.PrimaryScreen.WorkingArea.Width - Me.Width) / 2), CInt((Screen.PrimaryScreen.WorkingArea.Height - Me.Height) / 2))
' Me.FormBorderStyle = Windows.Forms.FormBorderStyle.FixedToolWindow
PictureBox1 = New PictureBox
PictureBox1.Size = New Size(175, 15)
PictureBox1.Location = New Point(20, 20)
Me.Controls.Add(PictureBox1)
AreaHeight = PictureBox1.Height
AreaWidth = PictureBox1.Width
NumberOfItems = 4
DistanceBetweenItems = 5
ItemLength = 6
ItemIndex = 0
Stage = 1
dx1 = 10
dx2 = CDec(0.4)
ReDim ItemX(NumberOfItems - 1)
InitializePositions()
Bmp = New Bitmap(AreaWidth, AreaHeight)
G1 = Graphics.FromImage(Bmp)
PictureBox1.Image = Bmp
Timer1 = New Timer
Timer1.Interval = 30
Timer1.Enabled = True
End Sub
Private Sub AnimateProgressBar()
G1.Clear(Color.White)
If ItemIndex >= NumberOfItems Then
ItemIndex = 0
Stage += 1
If Stage = 3 Then
Stage = 1
InitializePositions()
End If
End If
Dim Distance As Integer = CInt(((AreaWidth / 2) * Stage) - (ItemLength * (ItemIndex + 1)) - (DistanceBetweenItems * ItemIndex) + (NumberOfItems * (ItemLength + DistanceBetweenItems)))
If ItemX(ItemIndex) + dx1 > Distance Then
ItemX(ItemIndex) = Distance
ItemIndex += 1
Else
ItemX(ItemIndex) += dx1
End If
Dim i As Integer
For i = 0 To NumberOfItems - 1
G1.FillEllipse(Brushes.Blue, ItemX(i), CInt((AreaHeight - ItemLength) / 2), ItemLength, ItemLength)
G1.DrawEllipse(Pens.Blue, ItemX(i), CInt((AreaHeight - ItemLength) / 2), ItemLength, ItemLength)
ItemX(i) += dx2
Next
Me.PictureBox1.Invalidate()
End Sub
Private Sub InitializePositions()
Dim i As Integer
For i = 0 To NumberOfItems - 1
ItemX(i) = -ItemLength * (i + 1) - (DistanceBetweenItems * i)
Next
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
AnimateProgressBar()
End Sub
End Class
اما نقطه هایی که رسم میشن گرافیک خوبی ندارن
چطور میشه عکس زیر رو به جای ترسیم نقطه های گرافیکی قرار داد؟؟
circle.png