title: How do I make the main form show only if the user login is successful from a second form?
body: <p>I am trying to make a form that verifies user login. I want that form to show first then, if the user login is successful, the main form should show.</p>
  <p>this is what I have tried(in the second form):</p>
  <pre><code> private void button1_Click(object sender, EventArgs e)
      {
          string funame = &quot;thename&quot;;
          string dep = &quot;thedep&quot;;
          string unm = &quot;theusername&quot;;
          string ups = &quot;thepassword&quot;;
  
          User cs = new User(funame, dep, unm, ups);
  
          if (cs.validateLogin(unm, ups));
          {
              MessageBox.Show(&quot;Welcome &quot; + funame + &quot; of &quot; + dep);
  
              frmPurchaseDiscountedItem fpd = new frmPurchaseDiscountedItem();
              fpd.Show();
          }
  
          
  
      }
  </code></pre>
  <p>The problem is the main form always pops out first.</p>
  <p>It should be something like:</p>
  <p>*2nd form pops up then, if user is verified, main form pops up</p>