Private Sub Form1_Paint(ByVal sender As Object, ByVal pe As       PaintEventArgs) Handles _

   MyBase.Paint

        ' Declares the Graphics object and sets it to the Graphics object

        ' supplied in the PaintEventArgs.

        Dim g As Graphics = pe.Graphics

        ' Insert code to paint the form here.

    End Sub