title: My vb.net application crashes on openfileDialog using windows 10 OS
body: <p>My vb.net application <code>openfileDialog</code> works fine on <code>windows 7</code>, but it chrashes on windows 10. I had already enabled 3.5 framework on my <code>windows 10</code> OS but still no luck.
  here is my code:</p>
  
  <pre><code> Dim OpenFileDialog1 As New OpenFileDialog
          Try
              OpenFileDialog1.Filter = "Picture Files (*)|*.bmp;*.gif;*.jpg;*.png"
              If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
                  OpenFileDialog1.ShowHelp = True
                  pbAttachments.Image = Image.FromFile(OpenFileDialog1.FileName)
  
              Path_And_File_Name = OpenFileDialog1.FileName
              ImgFileSize = My.Computer.FileSystem.GetFileInfo(Path_And_File_Name).Length
  
              DoubleBytes = CDbl(ImgFileSize / 1048576) 'MB
              ImgFileSize_MB = FormatNumber(DoubleBytes, 2)
  
              If ImgFileSize_MB &gt; 3 Then
                  MsgBox("Image attachment is limited to 3 MB, the image file size you are trying to upload is " &amp; ImgFileSize_MB &amp; " MB!" &amp; vbCrLf &amp; "Please rezize your Image!", vbExclamation)
                  Exit Sub
              End If
          End If
      Catch ex As Exception
          MsgBox(ex.Message)
      Finally
          ReleaseMemory()
          OpenFileDialog1.Dispose()
      End Try
  </code></pre>
  
  <p>Please help, thank you!</p>