Hi to all,
below i attached the sub i did using application.DoEvents and Thread.sleep so that letters(characters i'm generating in a richtextbox go into the same richtextbox with slow motion.Now i want that i do a button named (PAUSE),
by which i can pause this process or a checkbox which when checked the animation is displayed.i guesses something like while checkbox.checked = true
thread.sleep
application.doEvents
will work out for me but it didn't.Pls find below my code::any help is greatly appreciated::
' Display chars one by one in the RichTextBox during a interval of time.
' This interval produces the animation
Private Sub display_slow_motion(ByRef str As String)
RichTextBox1.Clear()
quit = False
For i As Integer = 0 To str.Length - 1
RichTextBox1.Text += str(i)
If quit Then
Exit For
Else
Thread.Sleep(speed)
Application.DoEvents()
End If
Next
End Sub
below i attached the sub i did using application.DoEvents and Thread.sleep so that letters(characters i'm generating in a richtextbox go into the same richtextbox with slow motion.Now i want that i do a button named (PAUSE),
by which i can pause this process or a checkbox which when checked the animation is displayed.i guesses something like while checkbox.checked = true
thread.sleep
application.doEvents
will work out for me but it didn't.Pls find below my code::any help is greatly appreciated::
' Display chars one by one in the RichTextBox during a interval of time.
' This interval produces the animation
Private Sub display_slow_motion(ByRef str As String)
RichTextBox1.Clear()
quit = False
For i As Integer = 0 To str.Length - 1
RichTextBox1.Text += str(i)
If quit Then
Exit For
Else
Thread.Sleep(speed)
Application.DoEvents()
End If
Next
End Sub