469,327 Members | 1,242 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,327 developers. It's quick & easy.

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 9604
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by JCO | last post: by
6 posts views Thread by Johan Svedberg | last post: by
5 posts views Thread by junk mail | last post: by
6 posts views Thread by guoqi zheng | last post: by
2 posts views Thread by Greoasy | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by listenups61195 | last post: by
reply views Thread by Purva khokhar | last post: by
reply views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.