Pressing Enter on a button in a user control

  • Thread starter Thread starter Vijayakrishna Pondala
  • Start date Start date
V

Vijayakrishna Pondala

Hi,
If I press 'ENTER', when the focus is on a button in a form, the buttons
Click event fires but pressing 'ENTER' when the focus is on a button in a
user control doesn't fire the Click event of the button. Why? Pressing
<SPACE BAR> works fine with both.
Help!!!!
Regards,
Pondala Vijaya Krishna.
 
Hello,

Vijayakrishna Pondala said:
If I press 'ENTER', when the focus is on a button in a form,
the buttons Click event fires but pressing 'ENTER' when the
focus is on a button in a user control doesn't fire the Click
event of the button. Why? Pressing <SPACE BAR>
works fine with both.

I am not able to provide a solution but I am able to reproduce the problem
using .NET 1.0. Which version of .NET do you use?

Regards,
Herfried K. Wagner
 
I am using version 1.0.
I am able to solve the problem by handling the KeyPress event on the
buttons in user control, but just wanted to know why this happens.

Thanks,
Vijaya Krishna Pondala.
 
Back
Top