Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim pic() As PictureBox For x = 0 To 10 ReDim Preserve pic(x) pic(x) = New PictureBox With pic(x) .Location = New Point(10, (x + 1) * 60) .Height = 50 .BorderStyle = BorderStyle.FixedSingle AddHandler .Paint, AddressOf pic_Paint .Parent = Me End With Next End Sub Private Sub pic_Paint(ByVal sender As Object, ByVal e As PaintEventArgs) Dim g As Graphics = Me.CreateGraphics Dim pct As PictureBox = DirectCast(sender, PictureBox) g.DrawLine(New Pen(Color.Red, 3), 0, pct.Top - 2, Me.Width, pct.Top - 2) End Sub End Class