title: VB.net form restore not showing form
body: <p>I'm currently using VB.Net 2008.<br>
  The project has the "make single instance application" checkbox checked.  </p>
  
  <p>The application works by hiding the form when the form is minimized.  </p>
  
  <pre><code>Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
      If Me.WindowState = FormWindowState.Minimized Then
          Me.Hide()
      End If
  End Sub
  </code></pre>
  
  <p>When the appropriate menu item is pressed within the notifyicon the form should show itself again.  </p>
  
  <pre><code>     Private Sub ShowToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _  
                           Handles ShowToolStripMenuItem.Click
              Me.Show()
              Me.WindowState = FormWindowState.Normal
         End Sub  
  </code></pre>
  
  <p>This works fine until the user tries to open the same application while the form is minimized. When this occurs the application will block a new instance of the application the user was trying to open as expected, however when the user then goes to show the form from the notifyicon's menu it will have seemed to open (it shows the form in the taskbar) but no window is shown.  </p>
  
  <p>At this point the window can be maximized and works as intended but by using the restore button the window will not be drawn but will still be shown in the taskbar.</p>
  
  <p>If any help can be given on how to restore the form correctly from being hidden it would be most appreciated.</p>
  
  <p>Thanks in advance</p>