title: How do I create an "unfocusable" form in C#?
body: <p>I'm looking to create a form in C# that cannot accept focus, i.e. when I click a button on the form, focus is not stolen from the application that currently has the focus.</p>
  
  <p>See the Windows on-screen keyboard for an example of this. Note that when you click a button, the focus is not taken from the application you're currently using.</p>
  
  <p>How can I implement this behaviour?</p>
  
  <p>Update:</p>
  
  <p>Turns out it's as simple as overriding the <code>CreateParams</code> property and adding <code>WS_EX_NOACTIVATE</code> to the extended window style. Thanks for pointing me in the right direction!</p>
  
  <p>Unfortunately this has the undesirable side-effect that it messes with form movement, i.e. you can still drag and drop the form around the screen but the window's border is not displayed while dragging so it's difficult to precisely position it.</p>
  
  <p>If anyone knows how to solve this it would be appreciated.</p>