From comments, the test code I did, with a similar method as LesHay-2099 described, with a List of lines (Segment Class) :
(PictureBox and Scrollbars added from Design Mode)
Public Class Form1
'Method from http://csharphelper.com/blog/2018/12/let-the-user-draw-lines-in-c/
Private Segments As List(Of Segment) = New List(Of Segment)()
Private NewSegment As Segment = Nothing
Private SpecialSegment As Segment = Nothing
Private ptOrigin As Point = Nothing
Private ptDest As Point = Nothing
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
ptOrigin = New Point(CInt(PictureBox1.ClientSize.Width / 2), CInt(PictureBox1.ClientSize.Height / 2))
ptDest = New Point(CInt(PictureBox1.ClientSize.Width / 2), CInt(PictureBox1.ClientSize.Height / 2))
SpecialSegment = New Segment(Pens.Red, ptOrigin, ptDest)
Segments.Add(SpecialSegment)
HScrollBar1.Minimum = -CInt(PictureBox1.ClientSize.Width / 2)
HScrollBar1.Maximum = CInt(PictureBox1.ClientSize.Width / 2) + HScrollBar1.LargeChange - 1
HScrollBar2.Minimum = -CInt(PictureBox1.ClientSize.Height / 2)
HScrollBar2.Maximum = CInt(PictureBox1.ClientSize.Height / 2) + HScrollBar2.LargeChange - 1
End Sub
Private Sub PictureBox1_MouseDown(sender As Object, e As MouseEventArgs) Handles PictureBox1.MouseDown
NewSegment = New Segment(Pens.Blue, e.Location, e.Location)
PictureBox1.Refresh()
End Sub
Private Sub PictureBox1_Paint(sender As Object, e As PaintEventArgs) Handles PictureBox1.Paint
e.Graphics.Clear(PictureBox1.BackColor)
e.Graphics.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias
For Each segment As Segment In Segments
segment.Draw(e.Graphics)
Next
If NewSegment IsNot Nothing Then NewSegment.Draw(e.Graphics)
End Sub
Private Sub PictureBox1_MouseMove(sender As Object, e As MouseEventArgs) Handles PictureBox1.MouseMove
If NewSegment Is Nothing Then Return
NewSegment.pt2 = e.Location
PictureBox1.Refresh()
End Sub
Private Sub PictureBox1_MouseUp(sender As Object, e As MouseEventArgs) Handles PictureBox1.MouseUp
If NewSegment Is Nothing Then Return
NewSegment.pen1 = Pens.Black
Segments.Add(NewSegment)
NewSegment = Nothing
PictureBox1.Refresh()
End Sub
Private Sub HScrollBar1_Scroll(sender As Object, e As ScrollEventArgs) Handles HScrollBar1.Scroll
ptDest.X = ptOrigin.X + e.NewValue
SpecialSegment.pt2 = ptDest
PictureBox1.Refresh()
End Sub
Private Sub HScrollBar2_Scroll(sender As Object, e As ScrollEventArgs) Handles HScrollBar2.Scroll
ptDest.Y = ptOrigin.Y + e.NewValue
SpecialSegment.pt2 = ptDest
PictureBox1.Refresh()
End Sub
End Class
Class Segment
Public pen1 As Pen
Public pt1, pt2 As Point
Public Sub New(pen As Pen, point1 As Point, point2 As Point)
pen1 = pen
pt1 = point1
pt2 = point2
End Sub
Public Sub Draw(gr As Graphics)
gr.DrawLine(pen1, pt1, pt2)
End Sub
End Class