title: Show label text as warning message and hide it after a few seconds?
body: <p>I have buttons which validate if the user is administrator or not. If the user currently login is not an administrator then label will show as warning message and then hide after a few seconds. I tried using <code>lblWarning.Hide();</code> and <code>lblWarning.Dispose();</code> after the warning message, but the problem is, it hides the message before even showing the warning message. This is my code.</p>
  
  <pre><code>private void button6_Click(object sender, EventArgs e)
  {
      if (txtLog.Text=="administrator")
      {
          Dialog();
      }
  
      else
      {
         lblWarning.Text = "This action is for administrator only.";
         lblWarning.Hide();
      }
  
  }
  </code></pre>