473,569 Members | 2,844 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A simple TEXTBOX question

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_TextCh anged...

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
5 955

"Marcel Saucier" <Ma***********@ discussions.mic rosoft.com> wrote in message
news:48******** *************** ***********@mic rosoft.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_TextCh anged...

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
Move your code to LostFocus event of the text box. TextChanged, as intended,
will fire for every change.

"Marcel Saucier" <Ma***********@ discussions.mic rosoft.com> wrote in message
news:48******** *************** ***********@mic rosoft.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_TextCh anged...

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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
1412
by: Oli | last post by:
Hi Folks, Alright, I have a textbox called "A" and the value in that textbox is "B". When the user presses submit I want A : B to appear on the page. How do I do it? I appreciate that this is very basic stuff, but I got to start somewhere! Cheers (TIA)
3
2648
by: War Eagle | last post by:
I've been looking at .substring and .trim methods and I still have a question about extracting substrings from a textbox. Basically the textbox contains the full path to a file ... for example C:\testfile.txt or ... C:\download\temp\dlls\testfile.dll I want to be able to extract the file name from this textbox (and put it in a string) when I...
8
1865
by: pagates | last post by:
Hello, I am playing a little with Encoding, and I have what is possibly (forgive me) a newbie-type question. I have a function that takes a string and a codepage (based upon the basic MSDN help - look for "Using Unicode Encoding"). Anyway, I want to pass the contents of a textbox "as is", but always get a literal string. Using the...
2
8377
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when submitting the form to update the database. The server doesn't have the client side value any more. It seems to me that as I begin to write the...
0
1874
by: 42 | last post by:
I implemented a simple class inherited from Page to create a page template. It simply wraps some trivial html around the inherited page, and puts the inherited page into a form. The problem I have run into is that the emitted html at the end of the process is slightly different and doesn't work. Please don't be put off by all the source...
4
1489
by: ItNerd | last post by:
Someone PLEASE HELP ME!!!!! All I want to do is a simple postback and grab the value from a textbox on clicking a linkbutton like below, but the value is not writing to the screen. I am frustrated with this seemingly simple task. I have enabledviewstate=true on the @Page directive, and I tried using onclick on the linkbutton, nothing. I...
0
1645
by: Joe | last post by:
Hi, I have a simple form that does nothing but emails the whatever user entered in the form fields. The form is working fine and email sent. The problem I am having is in te string that forms the body of the email. I just want to insert line breaks using vbCrLf, but when I do that I get an error saying, Compiler Error Message: BC30451:...
9
1285
by: Nad | last post by:
Hello, I have a textbox control with EnableViewState=false I also have a datalist within a Panel in the same form with EnableViewState=false The datalist is filled using an SqlDataAdaptor. Why is it that the textbox retains its text value but the datalist doesn't retain its items in roundtrips?
2
2273
by: Eniac | last post by:
*argh* ... *pull hairs* I've recently started developing from ASP to ASP.NET The switch was fairly smooth since i had done some VB.net before ... then came...FORMS! :) I find it astounding at how difficult it has become to control a form, something that was so dead easy in ASP.
1
1124
by: Phillip Vong | last post by:
I have a simple Formview and in the InsertMode I have a calendar and a textbox. All I want is for people to click on a date and the date is populated to the textbox. Here is my simple code and my problem is converting the DateTxtBox to a date format. Can someone show me how to do this simple conversion? Thanks! Protected Sub...
0
7695
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7922
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8119
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7668
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5218
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
936
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.