I have a form with a custom control on it. Assume the custom control has the focus. If I show a message box from that form, when the message box is closed by pressing Enter on either the OK or Cancel button, the message box is closed and then the custom control gets a keyboard event (OnKeyUp) with the enter key.
This doesn't happen if the space key is used to "press" either the OK or Cancel button.
It's like the MessageBox doesn't consume the Enter Key for some reason. I tried this with the Form's KeyPreview property turned on, but there was no difference.
Does anyone know how to stop that enter message after it is used to press the MessageBox button?