hi, i'm making a paint program, just for fun, and i'm working on the line tool component but the only way i can get it to work right is to use Cls (see code) but then every time the user goes to create a new line, the old one is erased, please help! well here's the code (ignore any unused variables )

Dim point1x As Single
Dim point2x As Single
Dim point1y As Single
Dim point2y As Single
Dim pressed As Boolean
Private Type pointapi
X As Single
Y As Single
End Type
Dim point1 As pointapi
Dim point2 As pointapi

Private Sub Form_Load()
pressed = False
Picture1.AutoRedraw = True
End Sub

Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
point1x = X
point1y = Y
point1x = point2x
point1y = point2y
pressed = True
End Sub

Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
intcount = 0
point2x = X
point2y = Y
If pressed = True Then
Picture1.Cls
Picture1.Line (point1x, point1y)-(point2x, point2y), vbBlack
Else
pressed = False
End If
End Sub

Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
pressed = False
Picture1.Cls
Picture1.Line (point1x, point1y)-(point2x, point2y), vbBlack
End Sub