title: Force MessageBox.Show to display on top
body: <p>I have a simple winforms appl which will notify me when to add notes to my ticket. The problem I face is that when the application is minimised the messagebox doesnt show in front of all the other windows and programs I have open.</p>
  
  <p>The code I have is:</p>
  
  <pre><code>   private void button1_Click(object sender, EventArgs e) {
       DialogResult result1 = MessageBox.Show("Add some notes to your current ticket?",
        "Add Notes",
        MessageBoxButtons.YesNo);
  
  
       if (result1 == DialogResult.Yes) {
        Timer tm;
        tm = new Timer();
  
        tm.Interval = int.Parse(textBox2.Text);
        tm.Tick += new EventHandler(button1_Click);
  
        string pastebuffer = DateTime.Now.ToString();
        pastebuffer = "### Edited on " + pastebuffer + " by " + txtUsername.Text + " ###";
        Clipboard.SetText(pastebuffer);
  
        tm.Start();
       } else if (result1 == DialogResult.No) {
        //do something else
       }
  </code></pre>
  
  <p>My understanding is that i need to add <code>TopMost = True</code>. But i cannot see where to add that in my code?</p>