PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms Pressing Enter on a button in a user control

Reply

Pressing Enter on a button in a user control

 
Thread Tools Rate Thread
Old 02-09-2003, 11:05 AM   #1
Vijayakrishna Pondala
Guest
 
Posts: n/a
Default Pressing Enter on a button in a user control


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.


  Reply With Quote
Old 02-09-2003, 01:36 PM   #2
Herfried K. Wagner [MVP]
Guest
 
Posts: n/a
Default Re: Pressing Enter on a button in a user control

Hello,

"Vijayakrishna Pondala" <pvijkris@hotmail.com> schrieb:
> 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
--
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet


  Reply With Quote
Old 03-09-2003, 06:17 AM   #3
VIJAYAKRISHNA PONDALA
Guest
 
Posts: n/a
Default Re: Pressing Enter on a button in a user control

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.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off