Print out a string of text one letter at a time (own code, improvements welcomed!)
Print out a string of text one letter at a time (own code, improvements welcomed!)
Rate Print out a string of text one letter at a time (own code, improvements welcomed!)
(1(1 Vote))
Private Sub Form_Load()
i = 1 'set place in string to 1, as 0 doesnt exist
Timer1.Interval = 100
Text1.Text = ""
End Sub
Private Sub Timer1_Timer()
Dim PrintString As String
Dim letter As String
PrintString = "Written And Developed By Lee Turner" & vbCrLf & "Copyright (c) 2000" & vbCrLf & "All Rights Reserved" & vbCrLf & "If you have any questions, please direct them to: /dev/null" & vbCrLf & vbCrLf & vbCrLf & "j/k ;o) Direct them to: [email protected]" & vbCrLf & "Source code for this project is available at: http://www.lturner.co.uk" & "^" 'string to be printed
letter = Mid$(PrintString, i, 1)
i = i + 1 'move along the string one bit at a time
If letter = "^" Then 'set our escape character so we dont repeat for ever (any character can be used, I just chose ^
i = 1
Timer1.Enabled = False 'if the escape character is found, stop the timer
Else
Text1.Text = Text1.Text & letter 'print one letter of our string
End If
End Sub
Print out a string of text one letter at a time (own code, improvements welcomed!) Comments
No comments yet — be the first to post one!
Post a Comment