title: Win32Exception was unhandled - Visual Basic when clicking on the exit button
body: <p>I'm building a form using Microsoft Visual Studio 2010 32-bit Premium (Microsoft Visual Basic 2010). When I compile the code there aren't any errors, but whenever I click on the exit button it gives me this message:</p>
  
  <blockquote>
    <p>Win32Exception was unhandled" "error creating window handle".</p>
  </blockquote>
  
  <p>What is the reason for this error and how can it be fixed?</p>
  
  <p>I did this code in the university's lab, and it worked fine. But when I run it at home, I'm getting this error.</p>
  
  <pre><code>Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)    Handles btnExit.Click
      If MsgBox("Are you sure you want to exit the program?", MsgBoxStyle.Exclamation + MsgBoxStyle.YesNo) Then
          End ' error creating window handle 
      End If
  End Sub
  </code></pre>
  
  <p>I'm using Windows 8 64-bit and Microsoft Visual Studio 2010 32-bit Premium.</p>