473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Press Enter key in VB.Net

Hi,

Please let me know how I could move from one field to another on a form by
using the "Enter" key. I would like to use the enter key in a datagrid as
well. If you are replying with code please use vb.net.

Your help will be greatly appreciated.

Regards.

Jul 21 '05 #1
2 9774
Prepi,

You can use the keyup event to test if it was an enter key that has been
pushed and than set the focus on the next control using the
selectnextcontrol method.

For a datagrid it is completly different, there it would be automaticly, see
this to prevent that.
http://64.78.52.104/FAQ/WinForms/FAQ_c44c.asp#q791q

I hope this helps,

Cor
Jul 21 '05 #2
Thanks Cor. I will try the KeyUp method. However, with the datagrid, I cannot
get the Enter key to move to the next cell. The code in the link is in some
other language ( "C" I think) and hence I do not understand it.

Regards.

"Cor Ligthert" wrote:
Prepi,

You can use the keyup event to test if it was an enter key that has been
pushed and than set the focus on the next control using the
selectnextcontrol method.

For a datagrid it is completly different, there it would be automaticly, see
this to prevent that.
http://64.78.52.104/FAQ/WinForms/FAQ_c44c.asp#q791q

I hope this helps,

Cor

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: JCO | last post by:
How's come when I press the enter key, I can't get it to execute the correct password. It seems that I'm forced to press the button. I want to be able to do both. How is this done?
4
by: penny336 | last post by:
hi here is my original// it can convert to upper case or lower case but require user press "enter" how to implement a without "press enter" version e.g. if input 'a' --> at commad prompt will show...
6
by: Johan Svedberg | last post by:
Hi! I read somewhere that it is impossible to write a program in ANSI-C which only reads one char from the keyboard without having to press Enter (i.e. -questions). Is this true? -- Johan...
5
by: junk mail | last post by:
My friend is trying to code a small c program where he wants to force the user to press enter and only enter to continue. Currently he is using getchar() with a loop but you can type any number...
6
by: guoqi zheng | last post by:
In a regular html form, when user press "enter" key, the form will be submitted. However, in ASP.NET web form, a form will only be submitted (post back) when a special button is clicked. Many...
4
by: kotoro | last post by:
I'm in an intro to computer programming course and just for the purposes of my test drivers and personal implementation, I would like to know if it is possible to force the program to wait for the...
2
by: Greoasy | last post by:
I have a registration page with no of text boxes and 3 buttons for insert update and delete. and a logout button on the top of the page. If i place my control in an of the text box and press enter...
5
by: hmkaddoura | last post by:
Hi All, in my form I have two textboxes (T1,T2) and two buttons (B1,B2) how can i insert text in T1 and press enter to execute B1 event, and insert text in T2 and press enter to execute B2...
1
by: daonho | last post by:
I tried to use javascript to trigger up the button click function when user press enter key from the textbox. This function work fine with a single button click such has login page. However, if the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.