Results 1 to 5 of 5

Thread: Autotyping text query

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2006
    Posts
    52

    Autotyping text query

    Hello. Designing a form which requires a sort of movement in text.

    E.g. "Invalid Password . . . Please wait"

    In this line of text ^ the desired effect is that the three periods / full stops after "Invalid Password" need to be "animated" in the sense that it would look like this.

    "Invalid Password . Please wait" Step 1
    "Invalid Password . . Please wait"
    "Invalid Password . . . Please wait"
    "Invalid Password Please wait"
    "Invalid Password . Please wait"
    "Invalid Password . . Please wait"
    "Invalid Password . . . Please wait" Step 7

    And so on - repeating for the duration of the label's visibility.

    If anyone knows how to manipulate text in this manner, I'd be very grateful for help in doing so.
    Thanks a lot.

  2. #2
    PowerPoster
    Join Date
    Apr 2005
    Location
    Debug.Print
    Posts
    3,885

    Re: Autotyping text query

    you could use three labels that are the same width.
    in one, have one period
    in another, have two periods
    in another, have three periods

    then use a timer to show one and not the others and then cycle through them. just a thought. but you could maybe use InStr() but never used that before.

  3. #3
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Autotyping text query

    You could put it in a timer:

    VB Code:
    1. Private Sub Command1_Click()
    2.     Label1.Visible = True
    3.     Timer1.Enabled = True
    4. End Sub
    5.  
    6. Private Sub Command2_Click()
    7.     Label1.Visible = False
    8. End Sub
    9.  
    10. Private Sub Form_Load()
    11.     Label1.Visible = False
    12.     Label1.Caption = vbNullString
    13.     Timer1.Interval = 300
    14. End Sub
    15.  
    16. Private Sub Timer1_Timer()
    17.     Static lNum As Integer
    18.    
    19.     Label1.Caption = Replace("Invalid Password " & String(lNum, ".") & "Please Wait", ".", ". ")
    20.     lNum = IIf(lNum = 3, 0, lNum + 1)
    21.     Timer1.Enabled = Label1.Visible
    22. End Sub

  4. #4

    Thread Starter
    Member
    Join Date
    Apr 2006
    Posts
    52

    Re: Autotyping text query

    Ahh thank you very much, that works just as needed.

  5. #5

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width