title: Open Tab in IE8 using SendMessage() C#
body: <p>In this below code, <code>hWnd</code> is the "URL Handle" in Spy++:</p>
  
  <pre><code>'WorkerW -&gt; ReBarWindow32 -&gt; Address Band Root -&gt; Edit' 
  </code></pre>
  
  <p>The URL is what I want to open.</p>
  
  <p>I use the same method to open tabs in IE7 and send <code>hWnd</code> appropriately. I see that this works fine for IE7 and not for IE8. In IE8, it only opens 4 tabs and then IE8 stops honoring the SendMessage request; however, I can still press <code>CTRL+T</code> OR <code>ALT+Enter</code> to open new tabs in IE8 (so IE8 is still responsive).</p>
  
  <pre><code>/**
   * Open URL in IE (open new tab when newTab is true)
   * hWnd is found at runtime 
   **/
  private void LaunchURLinIE(IntPtr hWnd, String url, bool newTab = false)
  {
      StringBuilder ob = new StringBuilder(url);
      // Type text in the URL window
      SendMessage(hWnd, WM_SETTEXT, 0, ob);
      if (!newTab)
      {   // Press Enter
          SendMessage(hWnd, WM_KEYDOWN, VK_RETURN, 1);
      }
      else
      {   // Press ALT Enter to open new tab
          SendMessage(hWnd, WM_SYSKEYDOWN, VK_RETURN, 1 &lt;&lt; 29);
      }
  }
  </code></pre>
  
  <p>My environment is: <em>Windows XP Service Pack 3 [32-bit OS] , IE8 version 8.0.6001.18702</em> </p>
  
  <p>So, is it IE8 or something I am missing?</p>
  
  <p><b> UPDATE - 1 </b> 
  I have updated comments on the code so that its clear what code does. The above code works perfectly fine for IE7 (tested upto 15 tabs) but with IE8 it only opens upto 4 tabs.</p>
  
  <p>
  <b>Update - 2</b>
  I was able to sove this by using PostMessage instead of SendMessage.</p>
  
  <pre>
     private void LaunchURLinIE(IntPtr hWnd, String url, bool newTab = false)
      {
          StringBuilder ob = new StringBuilder(url);
          // Type text in the URL window
          SendMessage(hWnd, WM_SETTEXT, 0, ob);
          if (!newTab)
          {   // Press Enter
              PostMessage(hWnd, WM_KEYDOWN, VK_RETURN, 1);
          }
          else
          {   // Press ALT Enter to open new tab
              PostMessage(hWnd, WM_SYSKEYDOWN, VK_RETURN, 1 </pre>