title: Unhandled win32 exception occured in the application
body: <p>I have an application in vb.net that I'm testing out in Windows 10 and I seem to be getting an error (Images below). This app works flawlessly in Windows 7, and it actually works without any issues in Windows 10, the problem is, when I exit the application is when I get the error.</p>
  
  <p>The way it's structured, is if I run it from IDE, i first see a Login Windows where user logs in and then goes to MENU. If it's run in our environment, user does not have to log in, so the log in form never appears, it goes directly to MENU.</p>
  
  <p>Everything works great, until I go to EXIT Application, where it gets all messy, this is the code from EXIT button...</p>
  
  <pre><code>    Dim Answer as Integer
      Answer = MsgBox("Are you sure you wish to Close the application ?", MsgBoxStyle.YesNo)
      If answer = vbYes Then
          End
      End If
  </code></pre>
  
  <p>These are the errors I get:</p>
  
  <p><a href="https://i.stack.imgur.com/jkinw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jkinw.png" alt="enter image description here"></a>
  First I get this error, clicking on CLOSE PROGRAM closes it completely, if I click debug I get the below windows....</p>
  
  <p><a href="https://i.stack.imgur.com/nrE6k.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nrE6k.png" alt="enter image description here"></a></p>
  
  <p>With the 2nd error it shows that I actually have VS2010 and VS2012, and it lets me debug. The issue is, the source code is in TFS, and it just so happens that I can't access the TFS from my windows 10 machine, (only from Win 7). So I can't debug it. But is there a reason why this is happening only in windows 10?</p>
  
  <p>I even went as far as doing Me.Close() before END to make srue that the form is closed. And again, it works fine in Win 7, but win 10 it gives me the same problems.</p>