Solved

How to get ComboBox to recognize Enter key instead of Tab key

Posted on 2008-09-30
2
266 Views
Last Modified: 2012-06-27
Hello,

I have the combobox working with using the Tab key after a value has been selected from the drop-down.

The Tab key forces the LostFocus event for this combobox to run.

I'm trying to get the Enter key to do the same thing but not having any luck.

Please share your thoughts.

Thanks,
JMO9966
0
Comment
Question by:JMO9966
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Accepted Solution

by:
AUmidh earned 250 total points
ID: 22606491
@JMO9966

You can do as the following

Just add keydown event of combo box
and in that write the following condition
if(e.keycode==keys.Enter)
{
// add what you want..
}
0
 

Author Comment

by:JMO9966
ID: 22606704
Thanks, that worked slick!

There was two equal signs on yours is all so I changed that.

If (e.keycode==keys.Enter)

End If
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question