Hi Guys,
Here is my problem, but maybe someone can help me with this.
Background:
1. Using C#.
2. I'm having a form which the KeyPreview is on (and must stay like
this) and I'm implementing some functions on the Key up event of some
controls and the form.
The Problem starts when I display a messagebox on the form. Now, when
the user click either "Enter" or "Esc" on the message box, the
messagebox is disappear on the KeyDown event and leaving the keyup
event to the parent form or to the control which was in focus before
we display the message box. Now remember, this problem occur only when
we use the keyboard (we don't have a mouse in the system, everything
is done with the keyboard).
Please note, it turns out that the "Enter" and the "Esc" keys doesn't
fire the keydown event so we can't look to whether we had a keydown on
the form before and only if we had a keydown we perform the keyup
event. We need to find another solution.
We looking to find a way to know that the keyup event occurred on the
messagebox and ignore it.
Does anyone know how to solve this problem?
Thanks,
Ori.