Click here to Skip to main content
15,891,657 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to copy and replace folder in desktop with C#/Winforms? Pin
Pete O'Hanlon28-Jul-15 0:37
mvePete O'Hanlon28-Jul-15 0:37 
GeneralRe: How to copy and replace folder in desktop with C#/Winforms? Pin
George Tourtsinakis29-Jul-15 6:08
George Tourtsinakis29-Jul-15 6:08 
Questionintegrate payment gate away in asp.net website Pin
Member 1185937025-Jul-15 4:00
Member 1185937025-Jul-15 4:00 
AnswerRe: integrate payment gate away in asp.net website Pin
OriginalGriff25-Jul-15 4:13
mveOriginalGriff25-Jul-15 4:13 
AnswerRe: integrate payment gate away in asp.net website Pin
F-ES Sitecore25-Jul-15 9:20
professionalF-ES Sitecore25-Jul-15 9:20 
AnswerRe: integrate payment gate away in asp.net website Pin
George Tourtsinakis27-Jul-15 8:53
George Tourtsinakis27-Jul-15 8:53 
QuestionHello i need help for menustrip change theme Pin
Member 1186131324-Jul-15 7:02
Member 1186131324-Jul-15 7:02 
AnswerRe: Hello i need help for menustrip change theme Pin
OriginalGriff24-Jul-15 8:11
mveOriginalGriff24-Jul-15 8:11 
AnswerRe: Hello i need help for menustrip change theme Pin
Afzaal Ahmad Zeeshan24-Jul-15 8:11
professionalAfzaal Ahmad Zeeshan24-Jul-15 8:11 
QuestionText to Audio in C#? Pin
Shailendra Singh Chauhan24-Jul-15 3:06
Shailendra Singh Chauhan24-Jul-15 3:06 
AnswerRe: Text to Audio in C#? Pin
Wendelius24-Jul-15 3:40
mentorWendelius24-Jul-15 3:40 
GeneralRe: Text to Audio in C#? Pin
Shailendra Singh Chauhan24-Jul-15 6:03
Shailendra Singh Chauhan24-Jul-15 6:03 
AnswerRe: Text to Audio in C#? Pin
Dave Kreskowiak24-Jul-15 3:48
mveDave Kreskowiak24-Jul-15 3:48 
GeneralRe: Text to Audio in C#? Pin
Shailendra Singh Chauhan24-Jul-15 6:02
Shailendra Singh Chauhan24-Jul-15 6:02 
AnswerRe: Text to Audio in C#? Pin
Afzaal Ahmad Zeeshan24-Jul-15 8:10
professionalAfzaal Ahmad Zeeshan24-Jul-15 8:10 
GeneralRe: Text to Audio in C#? Pin
Shailendra Singh Chauhan24-Jul-15 17:08
Shailendra Singh Chauhan24-Jul-15 17:08 
Questionchange focous when enter texbox Pin
Cenator23-Jul-15 23:14
Cenator23-Jul-15 23:14 
AnswerRe: change focous when enter texbox Pin
OriginalGriff23-Jul-15 23:26
mveOriginalGriff23-Jul-15 23:26 
GeneralRe: change focous when enter texbox Pin
Cenator23-Jul-15 23:54
Cenator23-Jul-15 23:54 
GeneralRe: change focous when enter texbox Pin
Dave Kreskowiak24-Jul-15 2:12
mveDave Kreskowiak24-Jul-15 2:12 
QuestionRe: change focous when enter texbox Pin
Cenator24-Jul-15 2:46
Cenator24-Jul-15 2:46 
AnswerRe: change focous when enter texbox Pin
Dave Kreskowiak24-Jul-15 3:37
mveDave Kreskowiak24-Jul-15 3:37 
I know what you want. We're telling you that you're going against Microsoft's design guidelines. The guidelines are there to keep a consistent user experience across all applications. These guidelines were baked into the design of Windows Forms.

The reason you get the beep is because the TextBox, setup as single line input (the default), doesn't accept Enter as a valid key. On top of that, the form doesn't have its AcceptButton property set. Since neither control will accept the Enter key, Windows Forms knows that the key input isn't valid so it beeps to let the user know that.

Having said all that, it is possible to get rid of the beep, but you have to write your own TextBox control to do it. Create a new class, inheriting from TextBox. in the KeyPress (NOT KeyUp or KeyDown) event, put your Enter key handling code that you already have. You'll probably have to modify it a bit to get it to work. At the very least, you have to add one line of code when you handle the Enter key, e.Handled = true;

Compile that class and it'll show up in the ToolBox. Use that control instead of the normal TextBox when you want this functionality.
A guide to posting questions on CodeProject

Click this: Asking questions is a skill.
Seriously, do it.

Dave Kreskowiak

GeneralRe: change focous when enter texbox Pin
Cenator24-Jul-15 3:54
Cenator24-Jul-15 3:54 
QuestionChanging IP Address with program. Pin
Member 1129387623-Jul-15 22:14
Member 1129387623-Jul-15 22:14 
AnswerRe: Changing IP Address with program. Pin
OriginalGriff23-Jul-15 23:24
mveOriginalGriff23-Jul-15 23:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.