title: c# PostMessage not sending and no error
body: <p>First off,
  I'm trying to send keyboard input to a background application(A window that does'nt have focus or might not even appear visible to the user).</p>
  
  <p>I've verified that the winHandle and constants are correct.
  Problem is the background application doesn't seem to get the message, UNLESS,
  I set a breakpoint on the PostMessage() line, and press F10(step over) or F5(Continue) when it gets there,
  then the keystroke magically gets sent.</p>
  
  <p>What gives?
  Relevant code:</p>
  
  <pre><code>    [DllImport("User32.Dll", EntryPoint = "PostMessageA", SetLastError = true)]
      public static extern bool PostMessage(IntPtr hWnd, uint msg, int wParam, int lParam);
  
      PostMessage(winHandle, (uint)WM_KEYDOWN, 66, 0);
  </code></pre>
  
  <p>Using Win7 64 and MS Visual studio 2008 pro, Console application. And the above code is on a Thread if that helps.</p>