Click here to Skip to main content
16,006,605 members
Home / Discussions / C#
   

C#

 
GeneralRe: A text control that responds to the event when "Enter" key is pressed Pin
Rob Graham7-Aug-05 16:41
Rob Graham7-Aug-05 16:41 
GeneralRe: A text control that responds to the event when "Enter" key is pressed Pin
Mohamad Al Husseiny7-Aug-05 21:02
Mohamad Al Husseiny7-Aug-05 21:02 
GeneralRe: A text control that responds to the event when "Enter" key is pressed Pin
nidhelp7-Aug-05 22:42
nidhelp7-Aug-05 22:42 
GeneralRe: A text control that responds to the event when "Enter" key is pressed Pin
Mohamad Al Husseiny7-Aug-05 22:50
Mohamad Al Husseiny7-Aug-05 22:50 
GeneralRe: A text control that responds to the event when "Enter" key is pressed Pin
nidhelp7-Aug-05 23:47
nidhelp7-Aug-05 23:47 
GeneralRe: A text control that responds to the event when "Enter" key is pressed Pin
Mohamad Al Husseiny8-Aug-05 0:41
Mohamad Al Husseiny8-Aug-05 0:41 
GeneralRe: A text control that responds to the event when "Enter" key is pressed Pin
nidhelp9-Aug-05 15:44
nidhelp9-Aug-05 15:44 
GeneralRe: A text control that responds to the event when "Enter" key is pressed Pin
Mohamad Al Husseiny10-Aug-05 11:59
Mohamad Al Husseiny10-Aug-05 11:59 
Of Course !
because you but the code that move the focus in command button3 keypress event handler

nidhelp wrote:
private void button3_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs

so to make this happen when key pressed in textbox you must handle keypress event so you have two choice
after subscribe to textbox keypress event like you did in commandButton pass button3_KeyPress to it like the following
this.textBox1.KeyPress += new stem.Windows.Forms.KeyPressEventHandler(this.button3_KeyPress);

or create new function and copy the code in command button
keypress event in it so the subscip line will be like this
this.textBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox1_KeyPress);

Note:1-you dont have to write this code visual studio
will write it for you all you will do that you select to use existing function or new one
2-in your case you dont need this line of code
this.GetNextControl(button3,true).Focus();

Remove it or comment it by write // before them


MCAD
GeneralSerialze/Deserialize mixed xml elements Pin
michaelreian6-Aug-05 18:53
michaelreian6-Aug-05 18:53 
GeneralRe: Serialze/Deserialize mixed xml elements Pin
Guffa7-Aug-05 0:03
Guffa7-Aug-05 0:03 
GeneralRe: Serialze/Deserialize mixed xml elements Pin
michaelreian7-Aug-05 0:21
michaelreian7-Aug-05 0:21 
GeneralRe: Serialze/Deserialize mixed xml elements Pin
Guffa7-Aug-05 2:24
Guffa7-Aug-05 2:24 
Questiong.DrawString to display floating point? Pin
...---...6-Aug-05 16:15
...---...6-Aug-05 16:15 
AnswerRe: g.DrawString to display floating point? Pin
Rob Graham6-Aug-05 16:41
Rob Graham6-Aug-05 16:41 
GeneralRe: g.DrawString to display floating point? Pin
...---...7-Aug-05 7:54
...---...7-Aug-05 7:54 
GeneralRe: g.DrawString to display floating point? Pin
Rob Graham7-Aug-05 8:14
Rob Graham7-Aug-05 8:14 
AnswerRe: g.DrawString to display floating point? Pin
Sebrell6-Aug-05 17:04
Sebrell6-Aug-05 17:04 
GeneralWhen Public isnt really Public Pin
MrEyes6-Aug-05 8:57
MrEyes6-Aug-05 8:57 
GeneralRe: When Public isnt really Public Pin
Judah Gabriel Himango6-Aug-05 15:05
sponsorJudah Gabriel Himango6-Aug-05 15:05 
GeneralRe: When Public isnt really Public Pin
Robert Rohde7-Aug-05 6:00
Robert Rohde7-Aug-05 6:00 
GeneralRe: When Public isnt really Public Pin
Judah Gabriel Himango7-Aug-05 19:09
sponsorJudah Gabriel Himango7-Aug-05 19:09 
GeneralRe: When Public isnt really Public Pin
Luis Alonso Ramos6-Aug-05 15:17
Luis Alonso Ramos6-Aug-05 15:17 
GeneralRe: When Public isnt really Public Pin
MrEyes7-Aug-05 2:07
MrEyes7-Aug-05 2:07 
GeneralRe: When Public isnt really Public Pin
Dario Solera7-Aug-05 5:49
Dario Solera7-Aug-05 5:49 
GeneralRe: When Public isnt really Public Pin
MrEyes7-Aug-05 13:01
MrEyes7-Aug-05 13:01 

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.