' Draw the ball at (CurX, CurY).
Private Sub DrawBall()
    ' Fix the part of the image that was covered.
    picCanvas.Line _
        (OldX - BallR, OldY - BallR)- _
        Step(BallD, BallD), picCanvas.BackColor, BF
    OldX = CurX
    OldY = CurY
    ' Redraw the ball.
    picCanvas.Circle (CurX, CurY), BallR
    ' Update the display.
    picCanvas.Refresh
End Sub
               |