title: How do I set it so the text box is selected when prompt is called?
body: <pre><code>public int dialog()
  {
      Form prompt = new Form(); // creates form
  
      //dimensions
      prompt.Width = 300;
      prompt.Height = 125;
  
      prompt.Text = "Adding Rows"; // title
  
      Label amountLabel = new Label() { Left = 75, Top = 0, Text = "Enter a number" }; // label for prompt
      amountLabel.Font = new Font("Microsoft Sans Serif", 9.75F);
      TextBox value = new TextBox() { Left = 50, Top = 25, Width = prompt.Width / 2 }; // text box for prompt
      Button confirmation = new Button() { Text = "Ok", Left = prompt.Width / 2 - 50, Width = 50, Top = 50 }; // ok button
      confirmation.Click += (sender, e) =&gt; { prompt.Close(); }; // if clicked it will close
  
      prompt.AcceptButton = confirmation; // enter
  
      // adding the controls
      prompt.Controls.Add(confirmation);
      prompt.Controls.Add(amountLabel);
      prompt.Controls.Add(value);
      prompt.ShowDialog();
  
      int num;
      Int32.TryParse(value.Text, out num);
      return num;
  }
  </code></pre>
  
  <p><strong>This is what my prompt looks like when it's called</strong></p>
  
  <p><img src="https://i.stack.imgur.com/CxrQR.png" alt="Prompt"></p>
  
  <p>I just clicked a button to call that method. Now as you notice, the text box is not selected. How do I make it so that if this method is called, it will make the text box selected by default without having to click it or tab to it?</p>
  
  <p>(I know this is minor but every detail would look nicer)</p>