title: How to draw a line in VB.NET
body: <p>I am trying to draw a simple line with VB.NET.</p>
  
  <p>My code is as below, however when I run the code, only the form is shown up! There is no line.</p>
  
  <p>What did I do wrong here?    </p>
  
  <pre><code>Public Class Form1
    Dim pen As System.Drawing.Graphics
    Private Sub Form1_Load(ByVal sender As System.Object,
                           ByVal e As System.EventArgs) Handles MyBase.Load
      pen = Me.CreateGraphics()
      pen.DrawLine(Pens.Azure, 10, 10, 20, 20)
    End Sub       
  End Class
  </code></pre>