title: Problems with message boxes in VB.NET
body: <ul>
  <li>Windows 7 Home Premium X64</li>
  <li>Visual Basic 2010 Express SP1</li>
  <li>All Visual Studio updates installed except for a Visual C++ security update</li>
  </ul>
  
  <p>The problem:</p>
  
  <ol>
  <li>Sometimes message boxes in a console app close after clicking the ok button on one before all the messages are displayed. It is just supposed to display one message box after another. </li>
  <li>Same code as above, A message box in a console app will sometimes minimize to the taskbar before displaying all the messages after the OK button is clicked on</li>
  <li>The same code as the above 2 problem but in a Windows form app will display all of the message boxes, But.sometimes won't show the form at the end like it should.</li>
  </ol>
  
  <p>The bugs I know happen when I run the programs from VB itself, don't know about the EXE outside of VB.</p>
  
  <p>I know it isn't my code because others have tried it and had no problems.</p>
  
  <p>What can I try to fix it?</p>
  
  <p>EDIT: Code for the one with the button and form:</p>
  
  <pre><code>Public Class Form1
  
  Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
      Dim anInteger As Integer = 42
      Dim aSingle As Single = 39.345677653
      Dim aString As String = "I like pancakes"
      Dim aBoolean As Boolean = True
  
      MsgBox(anInteger)
      MsgBox(aSingle)
      MsgBox(aString)
      MsgBox(aBoolean)
  
  End Sub
  </code></pre>
  
  <p>End Class</p>
  
  <p>Code for the console ones:</p>
  
  <pre><code>Module Module1
  
  Sub Main()
      Dim anInteger As Integer = 42
      Dim aSingle As Single = 39.345677653
      Dim aString As String = "I like candy"
      Dim aBoolean As Boolean = True
  
      MsgBox(anInteger)
      MsgBox(aSingle)
      MsgBox(aString)
      MsgBox(aBoolean)
  
  
  
  End Sub
  </code></pre>
  
  <p>End Module</p>