Postup:
V deklaraΦnφ Φßsti formulß°e zapiÜte:
Sub delay(time)
Start = Timer
Do While Timer - Start < time
DoEvents
Loop
End Sub
Private Sub TypingEffect(msg As String, time)
Dim msgLen As Integer
Dim currIndex As Integer
Dim currChar As String
Dim currText As String
msgLen = Len(msg)
Do While currIndex <= msgLen
DoEvents
currIndex = currIndex + 1
currChar = Mid(msg, currIndex, 1)
currText = currText & currChar
Text1.Text = currText
delay time
DoEvents
Loop
End Sub
Na formulß° p°idejte
TextBox (Text1) a tlaΦφtko. Na udßlost Click tlaΦφtka:
Private Sub Command1_Click()
TypingEffect "The Bozena Software Ltd.", 0.15
End Sub
|