Here is the deal. I am timing the time elapsed between textchanged events and post the time into the same textbox that is being monitored for text_changed. Still following me? lol well I have attempted to eliminate the line elapsed through string.contains, because if I don't then I get a stack error for obvious reasons(infinite loop). Now looking at the code it seems like it should work in theory. Although it doesnt.
After clicking the button to start timing it correctly times the first event that the text is changed, and then does not work after that. So basically it only works once then doesn't post it after that when text is changed. After making changes im still stumped as it should work. Atleast the good thing is I got rid of the stack error lol. Any help would be appreciated.
PS. I am using the stopwatch class to do the timing.
After clicking the button to start timing it correctly times the first event that the text is changed, and then does not work after that. So basically it only works once then doesn't post it after that when text is changed. After making changes im still stumped as it should work. Atleast the good thing is I got rid of the stack error lol. Any help would be appreciated.
PS. I am using the stopwatch class to do the timing.
VB.NET:
[LEFT]
Private Sub DisplayTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DisplayTextBox.TextChanged
Dim elapsed As TimeSpan = Me.myStopwatch.Elapsed
Dim str As String
str = DisplayTextBox.Text
If str.Contains("<Wait>") = True Then
'do nothing
Else
DisplayTextBox.AppendText(String.Format(vbCrLf & elapsed.Milliseconds & "<mSeconds>" &))
myStopwatch.Restart()
End If
End Sub[/LEFT]