title: Openfiledialog works fine on windows 10, but freezes windows app on windows 7
body: <p>I have windows application, where my program have the following code:</p>
  
  <pre><code>static class Program
  {
      [STAThread]
      static void Main()
      {
          Application.EnableVisualStyles();
          Application.SetCompatibleTextRenderingDefault(false);
          Application.Run(new MainForm());
      }
  }
  </code></pre>
  
  <p>Now, on the MainForm(), I have few buttons, where upon clicking each of the button, I hide the MainForm and open a new form (Windows Form) using opendialog as shown in the below code:</p>
  
  <pre><code>this.Hide();
  TestCenter testCenter = new TestCenter();
  testCenter.ShowDialog();
  this.Show();
  </code></pre>
  
  <p>Now, in the TestCenter form, I have a functionality (OpenFileDialog) for selecting a file, as shown in the below code:</p>
  
  <pre><code>OpenFileDialog ofd = new OpenFileDialog();
  ofd.Filter = "image file |*.jpg;*.png;*.gif";
  DialogResult dr = ofd.ShowDialog();
  if (dr == DialogResult.Cancel)
      return;
  pictureBox_PartImage.Image = Image.FromFile(ofd.FileName);
  txt_ImagePath.Text = ofd.FileName;
  </code></pre>
  
  <p>I have a TextBox and a PictureBox, for showing the filepath and the image after making the selection in OpenFileDialog.</p>
  
  <p>The weird thing is, that, when I run this program from Visual Studio or from the installed programs on my laptop (Windows 10) it is working excellently without any issue.
  But when I install this on client machine (Windows 7) it is freezing this Windows Form application when I click on the button which calls this OpenFileDialog().</p>
  
  <p>Can someone please help me with this issue?</p>
  
  <p>--------EDIT--------2/7/18--------</p>
  
  <pre><code>private void btnImage_Click(object sender, EventArgs e)
  {
      OpenFileDialog ofd = new OpenFileDialog();
      // ofd.ShowHelp = true;
      ofd.Filter = "Image Files (*.png, *.gif, *.jpg)|*.png; *.gif*;*.jpg";
      DialogResult dr = ofd.ShowDialog();
      if (dr == DialogResult.Cancel)
          return;
      pictureBox_PartImage.Image = Image.FromFile(ofd.FileName);
      txt_ImagePath.Text = ofd.FileName;
  }
  </code></pre>