title: How to close a windows form after message box OK is clicked?
body: <p>Program has two forms: Login and the main form after login.
  Upon launching of the program, it connects to the database and checks if there is a new version available, if so, it instantly displays a MessageBox letting the user know to download the new version.</p>
  
  <p>When the user clicks OK, the application needs to be closed so the user can no longer use it until the new version is downloaded. The problem is, after clicking okay, the login form is still shown. My code for the class is below:</p>
  
  <pre><code> DialogResult dialog = MessageBox.Show("FleetTrack™ update required.\n\nA new version of FleetTrack™ is available on your Driver Hub. You must download"
          + " the latest update to use FleetTrack™.", "FleetTrack™ Update Required", MessageBoxButtons.OK);
          if (dialog == DialogResult.OK)
          {
  
  
              Application.ExitThread();
          }
  </code></pre>
  
  <p>Not too sure what I need to do. The application successfully shows the pop-up if the version running is different than what is shown in the database, but after clicking OK it just loads up the login form like normal.</p>