Type a word(s) letter by letter??? 
Author Message
 Type a word(s) letter by letter???

How can I have it to when a word entered either at design time or run time
it is printed letter by letter at a speed that the user will be able to see
it happen?

Thanks for any help
Jason



Wed, 02 May 2001 03:00:00 GMT  
 Type a word(s) letter by letter???
You should use a timer and then write your text word by word or letter by
letter.


Thu, 03 May 2001 03:00:00 GMT  
 Type a word(s) letter by letter???

Quote:

>How can I have it to when a word entered either at design time or run time
>it is printed letter by letter at a speed that the user will be able to see
>it happen?

    Dim sStr As String, i As Integer
    sStr = "My name is Jason."
    For i = 1 To Len(sStr)
        Text1.Text = Text1.Text & Mid$(sStr, i, 1)
        Text1.Refresh
        Sleep 400
    Next i

The Sleep API function is used to create the delay as each letter is added.  
This code sets the delay at .4 seconds.  In order to use the Sleep function,
you'll need to put the following declaration in the General Declarations
section of the form:

Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

The Refresh statement forces updating of the textbox on each pass of the loop
or you wouldn't see anything until the loop ends.

Lee Weiner
weiner AT fuse DOT net



Thu, 03 May 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Automatic Capital Letter for 1st Letter???

2. Automatic Capital Letter for 1st Letter???

3. insert letter after letter within a short time vb6

4. Randomize the order of letters in a word (or words in a sentence)

5. office2000 - can't type more than 2 letters

6. Allowing me to type chars with no number but Capital LETTERS

7. Typing letters with accents into a resource file

8. How to control the letters as you type ?help plzzzzzzzzz

9. ComboBox typing several letters to make a choice

10. Allowing me to type chars with no number but Capital LETTERS

11. Allowing me to type chars with no number but Capital LETTERS

12. Access 97 create a Word 97 letter

 

 
Powered by phpBB® Forum Software