Click here to Skip to main content
15,918,049 members
Home / Discussions / C#
   

C#

 
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 
QuestionC# program for my SSIS script task help Pin
czaar99923-Jul-15 21:16
czaar99923-Jul-15 21:16 
AnswerRe: C# program for my SSIS script task help Pin
Richard Deeming24-Jul-15 2:32
mveRichard Deeming24-Jul-15 2:32 
GeneralRe: C# program for my SSIS script task help Pin
czaar99924-Jul-15 21:42
czaar99924-Jul-15 21:42 
QuestionWays to store and insert x rows from mvc application to database Pin
ShikhaSC23-Jul-15 20:34
ShikhaSC23-Jul-15 20:34 
AnswerRe: Ways to store and insert x rows from mvc application to database Pin
Herman<T>.Instance23-Jul-15 21:21
Herman<T>.Instance23-Jul-15 21:21 
QuestionHow to raise font Height ? Pin
goldsoft23-Jul-15 9:38
goldsoft23-Jul-15 9:38 
AnswerRe: How to raise font Height ? Pin
Richard Deeming23-Jul-15 9:52
mveRichard Deeming23-Jul-15 9:52 
AnswerRe: How to raise font Height ? Pin
Sascha Lefèvre23-Jul-15 10:00
professionalSascha Lefèvre23-Jul-15 10:00 
GeneralRe: How to raise font Height ? Pin
goldsoft23-Jul-15 11:39
goldsoft23-Jul-15 11:39 
GeneralRe: How to raise font Height ? Pin
Richard MacCutchan23-Jul-15 20:54
mveRichard MacCutchan23-Jul-15 20:54 
GeneralRe: How to raise font Height ? Pin
Eddy Vluggen23-Jul-15 21:42
professionalEddy Vluggen23-Jul-15 21:42 
Questiontext to audio Pin
Member 1185276323-Jul-15 7:49
Member 1185276323-Jul-15 7:49 
AnswerRe: text to audio Pin
Dave Kreskowiak23-Jul-15 8:21
mveDave Kreskowiak23-Jul-15 8:21 
QuestionObject does not match target type Pin
Gilbert Consellado23-Jul-15 2:47
professionalGilbert Consellado23-Jul-15 2:47 

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.