Solved

Visual Studio 2005 VB After_Update equivalent

Posted on 2007-11-20
9
157 Views
Last Modified: 2013-11-26
Hi

What is the best equivalent of the VBA After_Update event in Visual Studio 2005 for a text box on a indows form?

Thanks
0
Comment
Question by:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 5

Expert Comment

by:administradores
ID: 20325880
I thin it is TextChanged
0
 

Author Comment

by:Murray Brown
ID: 20325964
Hi

That was the first thing I tried but the problem with that is that it calls the event after each character.
I need something that fires after I have type the whole word.
I am using the LostFocus event, but it is not quite the same.
Anyone know of anything else?
0
 

Author Comment

by:Murray Brown
ID: 20325969
Actually - would the Text_Update work?
0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 

Author Comment

by:Murray Brown
ID: 20326036
Sorry my last comment is wrong (I was looking at a combo box)
0
 
LVL 5

Expert Comment

by:administradores
ID: 20326111
And how do you know when the text is completed? a fixed length char? a keypress?


So i the users have to press enter you can use on keypress i it's a fixed length use textchanged and a like

if textbox.length = 10 then
your code
ebdif
0
 
LVL 5

Expert Comment

by:administradores
ID: 20326133
Update event raised after user press the return key

Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
        If e.KeyChar = Microsoft.VisualBasic.ChrW(Keys.Return) Then
            'Your Code to Update
Update()
        End If
    End Sub

Update event raised after user typed 10 characters

    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
        If Len(TextBox1) = 10 Then
            'Your Code
Update()
        End If
    End Sub
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 20326639
Have you checked the Validate event?
0
 

Author Comment

by:Murray Brown
ID: 20327049
How does the Validate event work?
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 20327065
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question