title: Cancel form load
body: <p>I have the following code :</p>
  
  <p>This call the second form</p>
  
  <pre><code>private void updateToolStripMenuItem_Click(object sender, EventArgs e)
          {
              Update fm = new Update();
              fm.ShowDialog();
          }
  </code></pre>
  
  <p>This is the constructor</p>
  
  <pre><code>    public Update()
      {
          InitializeComponent();
      }
  </code></pre>
  
  <p>This is the load</p>
  
  <pre><code>    private void Update_Load(object sender, EventArgs e)
      {
          String ver = checkver();
          if (ver == "update")
          {
              if (RemoteFileExists(dlUrl) == true)
              {
                  WebClient webClient = new WebClient();
                  webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(Completed);
                  webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(ProgressChanged);
                  webClient.DownloadFileAsync(new Uri(dlUrl), "");
              }
              else
                  MessageBox.Show("An error occurred. Please try later.");
          }
          else if (ver == "newest")
          {
              MessageBox.Show("You are currently using the newest version.");
              this.Close();
          }
          else
          {
              this.Close();
          }
      }
  </code></pre>
  
  <p>My problem is, that when the function result is 2 or 3 the form show up for millisecond and then close (flashing). I want the form to not flash. Is it possible?</p>
  
  <p>I tried to use <strong>this.Hide()</strong>, <strong>this.Visible = False</strong> but nothing helped.</p>
  
  <p>EDIT: I put the original code
  EDIT2: Put more code</p>