its pretty simple and staight forward so here it is:
VB Code:
Private Declare Function GetTickCount Lib "kernel32" () As Long Public Sub TypeWriter(txtt As TextBox, time As Single, text As String) '^^^ for time you put the amount of seconds you want it to wait Dim progress As Integer Dim lastc As Long progress = 1 lastc = GetTickCount time = time * 1000 Do While progress <> (Len(text) + 1) If GetTickCount - lastc > time Then txtt.text = txtt.text + Mid(text, progress, 1) txtt.Refresh progress = progress + 1 lastc = GetTickCount End If DoEvents Loop End Sub Private Sub Form_Load() Me.Show TypeWriter Text1, 0.5, "Welcome" End Sub




Reply With Quote