dawn,
It should fire the event. The click event is separate from a key press
event. The Handled property is used to indicate if the key press has been
handled. However, pressing the space bar on a button has the effect of
clicking it. If you want to get around this, then for your button, I would
have a module level variable that is set to true when the space bar is
pressed. Then, in the click event handler for your button, check to see if
the flag is true. If it is, do nothing, otherwise, do your processing.
However, this makes me wonder, since the space key and clicking the
button has the same desired effect, why not just handle the click event and
write the code in one place?
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"dawn" <da******@hotmail.com> wrote in message
news:S_********************@phobos.telenet-ops.be...
Hi,
I know I must be becoming a pain in the ass, but i've encountered yet
another little problem :
I catch an enter keypress with the KeyPress event handler....it does what
it needs to do.....but then after that it still fire the event for the button
that is active at that moment.
I've set e.Handled = true; but it still does that, any way i can
resolve this?
thanks (again :-))