First, this code should be throwing a "Object not set to an instance of an object" exception because you never set the value of
. Your code should begin like this:
Private Sub BGMap_Paint(sender As Object, e As PaintEventArgs) Handles BGMap.Paint
'System Rectangle drawn in design time.
Dim g As Graphics = e.Graphics
Next, what do you mean by "It keeps drawing it to the form"?? Your code SHOULD be prepared to redraw the contents of the form at any time as Windows will repaint your form on an as-needed basis, determined by Windows.