<p>I have a form with a progress bar and a cancel button which is displayed as a process runs. The buttons "Cancel" property is set to true so pressing escape, cancels the process.</p>

<p>But, as the button is the only control on the form capable of taking the focus, should the user inadvertently press enter (or space bar) while the process is running it will be cancelled.</p>

<p>I have prevented the Space Bar from working by setting KeyPreview to true (on the form) then setting KeyAscii to 0 but this approach deson't seem to work for the enter key as the button click event fires first.</p>

<p>I've tried setting the button's TabStop property to "false" - no change.</p>

In my opinion, the Enter key
should activate
the cancel button. Or are you requiring the user to reach out for the mouse? why?
I suggest adding just a confirmation dialog after the user cancels the operation, so if anyone accidentally presses the Enter key have the chance to resume saying 'no, I don't want to cancel'.
But as a user
I would be annoyed if the Cancel button has the focus and I can't activate it pressing the Enter key
on my keyboard.
My 2 cents