title: Redirecting from one form to other form on clicking login button
body: <p>I am trying to add a security module to my database application and what actually I am trying  to do is whenever I click on Logon button, it exits the login form and opens the main form depending on the role of user. 
  I have the following code:</p>
  
  <p><strong>LOGIN FORM:</strong></p>
  
  <pre><code>public void Login()
      {
          frmCommissionReport _commReport = new frmCommissionReport();
  
          if (_commission.Login(cbxLoginName, txbPassword))
          {
              MessageBox.Show("Successfull");
               // close this form - do not exit the application
              frmCommissionReport frm = new frmCommissionReport();
              this.Close();
              frm.ShowDialog();
  
          }
          else
          {
  
              MessageBox.Show("Username or Password not recognised");
  
          }
  
      }
  
      private void btnLogin_Click(object sender, EventArgs e)
      {
          Login();
  
      }
  </code></pre>
  
  <blockquote>
    <p><strong>MAIN FORM (frmCommissionReport)</strong></p>
  </blockquote>
  
  <pre><code>public frmCommissionReport()
      {
  
          InitializeComponent();
  
          _login.ShowDialog();
  
      }
  </code></pre>
  
  <blockquote>
    <p>But for some reasons whenever I fill in the login details and click Login Button, it again opens the same Login Form and keeps on duplicating the login form whenever I click Login Button rather than redirecting me to Main Form</p>
  </blockquote>
  
  <p><img src="https://i.stack.imgur.com/iK9b1.png" alt="enter image description here"> </p>