|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
textbox queryhi,
i've a textbox on my form whenever user presses ENter key, i want to capture the entire text... how can i acheive it On Fri, 11 May 2007 04:43:01 -0700, AVL <A**@discussions.microsoft.com>
wrote: > i've a textbox on my form If your textbox has the AcceptReturn property set to false (the default), > whenever user presses ENter key, i want to capture the entire text... > how can i acheive it and you have a button on the form set to be the default action button for the form, then you can just hook an event handler to that button. In the event handler, just get the Text property from your textbox control. If you don't have a button set as the default action, then you can still do it, but you instead need to handle the KeyDown or KeyPress event for the form (if you want it to always happen) or the control (if you want it to happen only when that control has focus), and get the Text property when you get the event with the Enter button as the key that was pushed. Pete |
|||||||||||||||||||||||