473,397 Members | 1,969 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,397 software developers and data experts.

Textbox, how to detect enter "key" event.

Hi All,

Could you please advice that how to detect the enter "key" event....

due to I don't want another button to do "Go" function.....

Best regards,
Boki.

Apr 28 '06 #1
3 3663
Respond to the Keypress event and look for an ASCII code of 13 (that's the
Enter key)
When you detect it (the 13) set it to 0 (zero) then proceed to do what you
want after that.
"Boki" <bo******@ms21.hinet.net> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
Hi All,

Could you please advice that how to detect the enter "key" event....

due to I don't want another button to do "Go" function.....

Best regards,
Boki.

Apr 28 '06 #2
In the Textbox's KeyDown event, do something like this:

If e.KeyCode = System.Windows.Forms.Keys.Enter Then

<do some stuff>
else
<do something else or nothing at all>
end if

james
"Boki" <bo******@ms21.hinet.net> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
Hi All,

Could you please advice that how to detect the enter "key" event....

due to I don't want another button to do "Go" function.....

Best regards,
Boki.

Apr 28 '06 #3
Bokki,

Try to use the Key Up event. You will be surprised how much information is
in the E.

Cor

"Boki" <bo******@ms21.hinet.net> schreef in bericht
news:11**********************@i40g2000cwc.googlegr oups.com...
Hi All,

Could you please advice that how to detect the enter "key" event....

due to I don't want another button to do "Go" function.....

Best regards,
Boki.

Apr 28 '06 #4

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

Similar topics

1
by: Raghul | last post by:
hi, I am developing a jabber client.What I need is whrn i enter text in the text area and when I press return key. The following text should be send.I found the way to send the message, the only...
3
by: Megha Vishwanath | last post by:
Hi, I have a struts form <html:form> in which although the focus rests on the submit button, hitting the enter key does not submit the form. I tried capturing the Enter key event and followed...
5
by: http://links.i6networks.com | last post by:
I want to force the users to click submit to submit the forms. How do I disable "Enter Key" which will submit the form automatically when they entered the data in text field then pressed "enter key"
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...
2
by: newbieto.net | last post by:
I have a requirement to map the enter key in the number pad to behave like a tab key in a asp.net application. Since the keydown event of any control in asp.net returns 13 (keycode) for both the...
5
by: Datagridtextboxcolumn not firing event | last post by:
"PLEASE HELP, I NEED HELP N O W !!!" AddHandler dgtxtboxcolumn.textbox.KeyDown, AddressOf TextBoxKeyPress Private Sub TextBoxKeyPress(ByVal sender as Object, ByVal e as KeyEventArgs) End...
1
by: Tyler Carver | last post by:
I'm using the Layout Template for the Login Control. I've included all the neccessary controls on the page and everything is working nicely except hitting the enter key on any of the textboxes...
5
by: gflor16 | last post by:
Problem: I have this code to run a word counter. But I have a problem when I hit the enter key, it doesn't give me any output of how many chars or words. ''' <summary> ''' Returns Word...
2
by: gyanendar | last post by:
Hi All, I have one search screen where some textboxes are there in which search crietria would be captured.After entering any serch criteria ,when user hit enter key ,Search result should get...
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
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: 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
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.