By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,333 Members | 1,047 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,333 IT Pros & Developers. It's quick & easy.

A simple TEXTBOX question

P: n/a
I want to execute a piece of code on textbox1.text WHEN the user (cursor)
exit that box (using the TAB or ENTER key). Not at every keyboard entry on
that box like I am getting right now with:

Private Sub TextBox1_TextChanged...

I dont see nothing into properties to achieve that.

Thank you very much again
--
Marcel Saucier
Mississauga, Ontario, Canada
Super Basic programmer under DOS since 1983. Absolutely dummy (& new) VB.NET
programmer under Windows since september 2005. It's about time to upgrade ?
Nov 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a

"Marcel Saucier" <Ma***********@discussions.microsoft.com> wrote in message
news:48**********************************@microsof t.com...
I want to execute a piece of code on textbox1.text WHEN the user (cursor)
exit that box (using the TAB or ENTER key). Not at every keyboard entry on
that box like I am getting right now with:

Private Sub TextBox1_TextChanged...

I dont see nothing into properties to achieve that.

Thank you very much again
--
Marcel Saucier
Mississauga, Ontario, Canada
Super Basic programmer under DOS since 1983. Absolutely dummy (& new)
VB.NET
programmer under Windows since september 2005. It's about time to upgrade
?


You're using the default event for a TextBox object, TextChanged, which is
behaving exactly as intended. Try placing your code in an event procedure
for the Leave or LostFocus event if you want to react when the user is
finished entering data into the TextBox object.

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.
Nov 21 '05 #2

P: n/a
Move your code to LostFocus event of the text box. TextChanged, as intended,
will fire for every change.

"Marcel Saucier" <Ma***********@discussions.microsoft.com> wrote in message
news:48**********************************@microsof t.com...
I want to execute a piece of code on textbox1.text WHEN the user (cursor)
exit that box (using the TAB or ENTER key). Not at every keyboard entry on
that box like I am getting right now with:

Private Sub TextBox1_TextChanged...

I dont see nothing into properties to achieve that.

Thank you very much again
--
Marcel Saucier
Mississauga, Ontario, Canada
Super Basic programmer under DOS since 1983. Absolutely dummy (& new) VB.NET
programmer under Windows since september 2005. It's about time to upgrade ?
Nov 21 '05 #3

P: n/a
Hi Peter & Siva,

It does work ! I just realized the lot of choice that I have, on the Studio
menu, for a particular objet...

My God, I still have a long way to go !

--
Super Basic programmer under DOS since 1983. Absolutely dummy (& new) VB.NET
programmer under Windows since september 2005 ! Most of you will agree to say
that it was about time to... upgrade !

Nov 21 '05 #4

P: n/a
It is working !
--
Super Basic programmer under DOS since 1983. Absolutely dummy (& new) VB.NET
programmer under Windows since september 2005 ! Most of you will agree to say
that it was about time to... upgrade !
Nov 21 '05 #5

P: n/a
It is working ! I realized all the choices of actions from the Studio menu...
--
Super Basic programmer under DOS since 1983. Absolutely dummy (& new) VB.NET
programmer under Windows since september 2005 ! Most of you will agree to say
that it was about time to... upgrade !
Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.