Update textbox in KeyDown event.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I update the value of a textbox with each keystroke while I am typing
in the textbox. I am thinking I would do it in the KeyDown event because I
dont want to exit the textbox to update it but instead update it continuously
with each keystroke.

Thank you for your help.


Steven
 
KeyDown is too early. The new character has not yet become part of the Text
of the control.

Use the Change event, and examine its Text property. (The Value is not
updated yet.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top