Hi...
I'm a newbie in VB.NET...
I wanna know is there a way to make the function running pause for a few seconds before re-run itself in a for loop such as below:
Function con(ByVal bufferstring As String) As String
Dim i As Integer
Dim temp As String
For i = 0 To bufferstring.Length - 1
temp &= vbCrLf & bufferstring.Chars(i)
Next
End Function
The function above will print characters by characters from the variable "temp". However, it print all in one go. Is there a code to make it print 1 character then wait for 5 seconds before printing the 2nd character and so on...
I tried using System.Threading.Thread.Sleep(5000) but it'll just hang there for 5 seconds and then in 1 go, print out all my characters which is not the outcome I want.
Anyone got ideas how to do it?
Please advice. Thank you..
I'm a newbie in VB.NET...
I wanna know is there a way to make the function running pause for a few seconds before re-run itself in a for loop such as below:
Function con(ByVal bufferstring As String) As String
Dim i As Integer
Dim temp As String
For i = 0 To bufferstring.Length - 1
temp &= vbCrLf & bufferstring.Chars(i)
Next
End Function
The function above will print characters by characters from the variable "temp". However, it print all in one go. Is there a code to make it print 1 character then wait for 5 seconds before printing the 2nd character and so on...
I tried using System.Threading.Thread.Sleep(5000) but it'll just hang there for 5 seconds and then in 1 go, print out all my characters which is not the outcome I want.
Anyone got ideas how to do it?
Please advice. Thank you..