title: Creating a Pop-Up form in C#
body: <p>I am trying to create a windows form that gets displayed for 2 seconds when triggerd by an event, and then closes automatically. </p>
  
  <p>I have tried several options. This is my current code: </p>
  
  <pre><code>        this.aletPopup.StartPosition = FormStartPosition.CenterScreen;
          this.aletPopup.Show();
          Thread.Sleep(2000);
          this.aletPopup.Close();
  </code></pre>
  
  <p>This preforms the actions that I desire, however, when the form loads it does not load the label or image which is on the form. Instead, the area where the image and label are become transparent. My desired output is this: 
  <img src="https://i.stack.imgur.com/Mfm8K.png" alt="enter image description here"></p>
  
  <p>I have also tried using <code>this.aletPopup.ShowDialog();</code>, which does display the graphics. However, the form will not close automatically when using this method. </p>
  
  <p><strong>EDIT:</strong> I am attempting to use 
  Michael Perrenoud's solution. However, I cannot get the form to close. I have a timer set at a 2000ms interval which is initally disabled. Am I overriding the OnShown correctly? </p>
  
  <pre><code>public AlertPopForm()
      {
          InitializeComponent();
  
      }
  
      private void closingTimer_Tick(object sender, EventArgs e)
      {
          closingTimer.Enabled = false;
          this.Close();
      }
  
      private void AlertPopForm_OnShown(object sender, System.EventArgs e)
      {
          closingTimer.Enabled = true;
          closingTimer.Start(); 
      }
  </code></pre>