title: Drawing a rectangle in vb.net
body: <p>I want to draw a simple 2d rectangle on a form.</p>
  
  <p>Because I have never done anything graphical in vb.net, I searched the web and found many instances, that offer solutions similar to this one.</p>
  
  <pre><code>Public Sub DrawRectangleRectangle(ByVal e As PaintEventArgs)
  
      ' Create pen. 
      Dim blackPen As New Pen(Color.Black, 3)
  
      ' Create rectangle. 
      Dim rect As New Rectangle(0, 0, 200, 200)
  
      ' Draw rectangle to screen.
      e.Graphics.DrawRectangle(blackPen, rect)
  End Sub
  </code></pre>
  
  <p>Yet, I don't understand how this works..
  What is this <code>e As PaintEventArgs</code> ? What input does this sub require? How can I draw a simple rectangle?</p>
  
  <p>For starters, I want something simple to work so I can experiment on it and eventually learn more advanced stuff.</p>