I have a textbox that I have written a KeyUp event for, and it looks at the contents of the text box for validation. The problem is that when I type the number too fast, the previous event evaluates to true and fires heavy database routines multiple times. I can't quite figure this out, any ideas or workarounds or just stuff that I am not doing? The TextBox is filling up before the last event fires somehow. It does not happen when the number is typed slowly. here is some code:
Muchos Gracias!
VB.NET:
Private Sub InputField_KeyUp(ByVal sender As Object, ByVal e As _ System.Windows.Forms.KeyEventArgs) Handles InputField.KeyUp
If ValidInputText(Me.InputField.Text) Then
'see if the contents are in the right format
If Exists(Me.InputField.Text) Then
'checks correct format for existence in the SQLServer
GatherAll()
'create the worker threads to make objects from the SQLServer
End If
End If
End Sub
Last edited by a moderator: