title: C# how to show message after specific time period
body: <p>In my project I would like to show message or call methods after 5 minutes for example, If the users didn't click on specific button, I wrote this code </p>
  
  <pre><code>  Boolean flage = false;
  
      private void button1_Click(object sender, EventArgs e)
      {
          Timer Clock;
          Clock = new System.Windows.Forms.Timer();
          Clock.Interval = 1000;
          Clock.Start();
          Clock.Tick += new EventHandler(Timer_Tick);
  
      }
      public void Timer_Tick(object sender, EventArgs eArgs)
      {
          if (flage == false)
          {
              MessageBox.Show("after period of time ");
          }
      }
  
      private void button2_Click(object sender, EventArgs e)
      {
          flage = true;
      }
  </code></pre>
  
  <p>Its keeping show the messageBox can any body help me.</p>