title: When typing text in textbox, keep background constant
body: <p>I'm writing a program that starts out with requiring a certain amount of lines of text and for that I use a <code>TextBox</code>. To make the program look nice, I put a background image on the form. Now I don't want the <code>TextBox</code> to put a large white block on the image, so for that I made the <code>TextBox</code> have a transparent background. But here's the problem: as soon as I start putting text in the <code>TextBox</code>, the lines that have text will revert back to the white background that I don't want. So how can I stop my program from doing that?</p>
  
  <p>I can't post images yet, so I'll just use links:</p>
  
  <p>This image shows the background as I have it and how I want it to be:<br>
  <img src="https://i.stack.imgur.com/W3udG.jpg" alt="">
  <br></p>
  
  <p>This image shows what happens when I start typing:<br>
  <img src="https://i.stack.imgur.com/ow0fN.jpg" alt=""></p>
  
  <p>I want the background to just remain the same while I type (of course the text colour should then be lighter, but the textbox.forecolor seems to have no effect.</p>
  
  <p>So below is the code I have so far, I hope you can help me, I'm still quite new to this :)</p>
  
  <pre><code>public class NieuwSpel : Form
  {
      Label spelerslijst, nummer;
      TextBox spelersInput, spelnr;
      Button OK;
  
      public NieuwSpel()
      {
          this.BackgroundImage = WeerwolvenvanWakkerdam.Properties.Resources.Background_NieuwSpel;
          this.FormBorderStyle = FormBorderStyle.Fixed3D;
  
          spelerslijst = new Label();
          spelerslijst.Location = new Point(10, 10);
          spelerslijst.Text = "Voer hier de spelerslijst in:";
          spelerslijst.Width = 200;
          spelerslijst.BackColor = Color.Transparent;
          spelerslijst.ForeColor = Color.White;
          this.Controls.Add(spelerslijst);
  
          spelersInput = new CustomTextBox();
          spelersInput.Location = new Point(10, 40);
          spelersInput.Size = new Size(200, 300);
          spelersInput.Multiline = true;
          spelersInput.BackColor = Color.FromArgb(100, 100, 100, 100);
          spelersInput.ForeColor = Color.White;
          spelersInput.GotFocus += this.setColour;
          this.Controls.Add(spelersInput);
  
          OK = new Button();
          OK.Text = "Start Spel!";
          OK.Location = new Point(110, 430);
          OK.Click += this.Start;
          this.Controls.Add(OK);
  
          nummer = new Label();
          nummer.Text = "Spelnummer:";
          nummer.Width = 75;
          nummer.Location = new Point(10, 360);
          nummer.BackColor = Color.Transparent;
          nummer.ForeColor = Color.White;
          this.Controls.Add(nummer);
  
          spelnr = new CustomTextBox();
          spelnr.Width = 50;
          spelnr.Height = 20;
          spelnr.Location = new Point(90, 360);
          spelnr.BackColor = Color.FromArgb(100, 100, 100, 100);
          spelnr.ForeColor = Color.White;
          this.Controls.Add(spelnr);
      }
  
      public void setColour(object o, EventArgs ea)
      {
          ((CustomTextBox)o).BackColor = Color.FromArgb(100, 100, 100, 100);
      }
  }
  
  public partial class CustomTextBox : TextBox
  {
      public CustomTextBox()
      {
          SetStyle(ControlStyles.SupportsTransparentBackColor |
               ControlStyles.OptimizedDoubleBuffer |
               ControlStyles.AllPaintingInWmPaint |
               ControlStyles.ResizeRedraw |
               ControlStyles.UserPaint, true);
      }
  }
  </code></pre>