title: How to send backspace using sendmessage(C#) to cmd.exe
body: <p>I am trying to send keystrokes to cmd.exe that I launch from my app. In doing so, I am able to send all the keyboard characters, but if I try to send Backspace, it doesnt seem to take effect. The following is the code snippet to send message to cmd.exe:</p>
  
  <pre><code>SendMessage((int)shell.MainWindowHandle, WM_KEYDOWN, ((int)e.KeyCode), 0);
  SendMessage((int)shell.MainWindowHandle, WM_KEYUP, ((int)e.KeyCode), 0);
  </code></pre>
  
  <p>Any idea why this wouldnt work? What is the best way to send to the stdin of cmd.exe from a C# app?</p>
  
  <p>thanks in advance </p>