title: Draw Line in TextBox C# (.NET 3.5)
body: <p>i need a textbox with a bottom-line such like inputfields used in forms.</p>
  
  <p>I had looked for a functionality like single border on bottom, or something like this.
  But i think the only way is to draw a single line in a textbox.</p>
  
  <p>The following code doesn't work:</p>
  
  <pre><code>private void textEdit1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
      {
          if (sender is TextBox)
          {
              TextBox tmp = (TextBox)sender;
              Graphics g = CreateGraphics();
              Pen p = new Pen(System.Drawing.Color.Red, 8);
              g.DrawLine(p, tmp.Location.X, tmp.Location.Y, (tmp.Location.X + tmp.Width), tmp.Location.Y);
              p.Dispose();
              g.Dispose();
          }
      }
  </code></pre>
  
  <p>Hope someone could help! Thanks!</p>