473,386 Members | 1,748 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.

Event of Enter Key

Hello there,

I am using Visual Basic 2005. I want to store a value when I press
enter key on the keyboard.

Could anyone help me out?
Thanks alot.

Jun 11 '07 #1
4 2384

"portCo" <wo*****@gmail.comwrote in message
news:11********************@j4g2000prf.googlegroup s.com...
Hello there,

I am using Visual Basic 2005. I want to store a value when I press
enter key on the keyboard.

Could anyone help me out?

You should use Google and look-up how to use the Form and Controls Keyup
Keypress, and Keydown events. All of that should also be explained in VS
2005 Help with examples too.

Jun 12 '07 #2
On Jun 12, 2:15 am, "Mr. Arnold" <MR. Arn...@Arnold.comwrote:
"portCo" <woos...@gmail.comwrote in message

news:11********************@j4g2000prf.googlegroup s.com...
Hello there,
I am using Visual Basic 2005. I want to store a value when I press
enter key on the keyboard.
Could anyone help me out?

You should use Google and look-up how to use the Form and Controls Keyup
Keypress, and Keydown events. All of that should also be explained in VS
2005 Help with examples too.
Or if you wanted a quick and dirty solution - just add a button and
make it the accept button for the form and add your logic to it's
button_click event. Then any time a user hits enter it will fire the
click event and process your logic. Though, if you want to only store
values from the enter key being pressed (and not allow the user to
manually press the button) then I would go with one of the 3 key
events mentioned previously.

Thanks,

Seth Rowe

Jun 12 '07 #3

"rowe_newsgroups" <ro********@yahoo.comwrote in message
news:11*********************@j4g2000prf.googlegrou ps.com...
On Jun 12, 2:15 am, "Mr. Arnold" <MR. Arn...@Arnold.comwrote:
>"portCo" <woos...@gmail.comwrote in message

news:11********************@j4g2000prf.googlegrou ps.com...
Hello there,
I am using Visual Basic 2005. I want to store a value when I press
enter key on the keyboard.
Could anyone help me out?

You should use Google and look-up how to use the Form and Controls Keyup
Keypress, and Keydown events. All of that should also be explained in VS
2005 Help with examples too.

Or if you wanted a quick and dirty solution - just add a button and
make it the accept button for the form and add your logic to it's
button_click event. Then any time a user hits enter it will fire the
click event and process your logic. Though, if you want to only store
values from the enter key being pressed (and not allow the user to
manually press the button) then I would go with one of the 3 key
events mentioned previously.
In heavy data entry solutions, I like to use the Enter-Key on a form's
control in the control's key event.

Users doing heavy data entry like being able to push that Enter-Key and move
to the next control without having to click to it.
Jun 12 '07 #4
On Jun 12, 7:24 am, "Mr. Arnold" <MR. Arn...@Arnold.comwrote:
"rowe_newsgroups" <rowe_em...@yahoo.comwrote in message

news:11*********************@j4g2000prf.googlegrou ps.com...
On Jun 12, 2:15 am, "Mr. Arnold" <MR. Arn...@Arnold.comwrote:
"portCo" <woos...@gmail.comwrote in message
>news:11********************@j4g2000prf.googlegrou ps.com...
Hello there,
I am using Visual Basic 2005. I want to store a value when I press
enter key on the keyboard.
Could anyone help me out?
You should use Google and look-up how to use the Form and Controls Keyup
Keypress, and Keydown events. All of that should also be explained in VS
2005 Help with examples too.
Or if you wanted a quick and dirty solution - just add a button and
make it the accept button for the form and add your logic to it's
button_click event. Then any time a user hits enter it will fire the
click event and process your logic. Though, if you want to only store
values from the enter key being pressed (and not allow the user to
manually press the button) then I would go with one of the 3 key
events mentioned previously.

In heavy data entry solutions, I like to use the Enter-Key on a form's
control in the control's key event.

Users doing heavy data entry like being able to push that Enter-Key and move
to the next control without having to click to it.
In heavy data entry solutions, I like to use the Enter-Key on a form's
control in the control's key event.

Users doing heavy data entry like being able to push that Enter-Key and move
to the next control without having to click to it.
As do I (especially for Access migrations), I only included my method
because it seemed that the OP was trying to activate a Save routine
whenever a user pressed enter. If so, it is typical to also have a
save button on the form - so if the OP just wanted the enter key to
run the save routine the button uses, it would be easier to set the
save button as the default button instead of using key hooks (IMO).

Thanks,

Seth Rowe

Jun 12 '07 #5

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

Similar topics

0
by: Krisa | last post by:
Hello all, I just discovered something (stop me if you've heard this before....) that was causing me a significant performance hit when opening a form with subforms. To speed up loading the...
1
by: seash | last post by:
Is there any way to suppress an event method? i got Enter & leave Events on two groupBoxs, they r " private void groupBox1_Enter(object sender, System.EventArgs e)" and private void...
0
by: Miquel | last post by:
Hi all. I felt frustrated when developing an 'UserControl' derivated from textBox, because sequence event (and Validate event) seems to fail. I Always thought my code was wrong. But after...
5
by: PD | last post by:
The TextChanged event is not being called when I hit the "Enter" key. Yet it does for the "Tab" key. I set a break point in the Page_Load event and the TextChanged event and none of these get...
3
by: TCORDON | last post by:
Why does the click event of an image button that submitts a form does not get fired when ENTER is pressend on a textbox of that form? How can I make this happen? Thanks
3
by: Nikolay Evseev | last post by:
Hi, I am trying to trace down the Enter key in my Form.KeyPress event handler. The KeyPreview property is set to false, so I'd assume that all key presses should go through my form's KeyPress...
3
by: Robert W. | last post by:
I'm new to ASP.net programming so excuse my ignorance if the following question seems overly simplistic. I've created a simple Login form with 3 primary WebControls: - A TextBox for the Username...
11
by: ChrisM | last post by:
Hi, Don't know if anyone can cast any light on this... I have a fairly complex C# WinForm with (amongst other) a text box and a button. The TextBox has events declared for KeyUp and KeyDown,...
5
by: Stuart Shay | last post by:
Hello All I am working on ASP.NET 1.1 Custom Pager that allows a User to Enter a Number in a TextBox and go to the page selected. Since the OnClick Event does not work in ASP.NET 1.1 for a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.