.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old October 8th, 2004, 08:55 AM
MrKoala MrKoala is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 13 MrKoala User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
KeyDown/KeyPress/KeyUp with Enter

I have some problems with dealing with the enter key. The problem is this one:

I have a textbox in a form, and I want to send the information contained in the TextBox when the user presses enter while the TextBox has the focus.

I tried to use the KeyDown event to catch the Keys.Enter key, performing my stuff and setting args.Handled to true. The problem is that the bell rings every time I press Enter in the TextBox.

I am current using the KeyPress event to deal with it, performing my stuff when args.KeyChar =='\r'. What I am thinking is that on other platforms (like the ones with X in their names), this would not work since they are not using '\r' as their end-of-line character. Has anyone experience with this? Is this true? Is there a more portable way?

Thanks in advance

MrKoala

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgramming.NET Development > KeyDown/KeyPress/KeyUp with Enter


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway