VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Print out a string of text one letter at a time (own code, improvements welcomed!)

by Lee Turner (2 Submissions)
Category: String Manipulation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Tue 11th January 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)

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!)



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



Download this snippet    Add to My Saved Code

Print out a string of text one letter at a time (own code, improvements welcomed!) Comments

No comments have been posted about Print out a string of text one letter at a time (own code, improvements welcomed!). Why not be the first to post a comment about Print out a string of text one letter at a time (own code, improvements welcomed!).

Post your comment

Subject:
Message:
0/1000 characters