title: ShowWindowAsync() don't show hidden window (SW_SHOW)
body: <p>hello
  i'm using <code>Visual Basic 2008</code></p>
  
  <p><strong>here is part of my code:</strong></p>
  
  <pre><code>    Private Const SW_HIDE As Integer = 0
      Private Const SW_SHOW As Integer = 5
  
      &lt;DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)&gt; _
       Private Shared Function ShowWindowAsync(ByVal hwnd As IntPtr, ByVal nCmdShow As Integer) As Boolean
          End Function
  </code></pre>
  
  <p><em>button1 code:</em></p>
  
  <pre><code>            Try
                 Dim p() As Process = Process.GetProcessesByName("notepad")
                 Dim mwh = p(0).MainWindowHandle
                 ShowWindowAsync(mwh, SW_HIDE)
              Catch ex As Exception
                 MsgBox("error")
              End Try      
  </code></pre>
  
  <p><em>button2 code:</em></p>
  
  <pre><code>            Try         
                 Dim p() As Process = Process.GetProcessesByName("notepad")
                 Dim mwh = p(0).MainWindowHandle
                 ShowWindowAsync(mwh, SW_SHOW)
              Catch ex As Exception
                 MsgBox("error")
              End Try  
  </code></pre>
  
  <p>when i click <code>button 1</code> ( to hide the window ) it works good, but then when i want to display window back ( by clicking <code>button 2</code> ) the function returns <code>FALSE</code>, who can tell me why? and how to get it to work, to hide window and then to show it again?</p>