Results 1 to 4 of 4

Thread: Invisible Phrases/Words

  1. #1

    Thread Starter
    Fanatic Member Dim's Avatar
    Join Date
    Jul 2000
    Posts
    620
    Does anyone know how to make specified phrases/word invisible in a text box? Or is it only possible if i erase them?


    Thanx you,
    D!m
    Dim

  2. #2
    Guest
    Do you mean invisible to the User? Or invisible to the System?

  3. #3
    Lively Member Zero's Avatar
    Join Date
    Feb 2000
    Posts
    101
    One could use the RichText control to make the text of the phrase the same color as the background.

    Consider the following:

    RichText1.Text = "Now is the time for all good men to come to the aid of their country."

    SearchFor$ = Inputbox("Make what invisible?")
    Location = InStr(1, Ucase(Ri4chText1.Text), Ucase(SearchFor$))

    If Location = 0 Then
    MsgBox "That's not in the string!"
    Else
    RichText1.SelStart = Location
    RichText1.SelLength = Len(SearchFor$)
    RichText1.SelColor = &H00FFFFFF&
    End If


    This code sample will find the word you enter in the InputBox and make it white. If the background color of the RichTextbox control is white, the text will be invisible.
    This, of course, will only change the first instance of the word. You will have to repeat the procedure with a Do While loop.

    Likewise, you can delete the word by changing this:

    RichText1.SelColor = &H00FFFFFF&

    To this:

    RichText1.SelText = ""


    Hope that helps.

    -Zero the Inestimable

  4. #4

    Thread Starter
    Fanatic Member Dim's Avatar
    Join Date
    Jul 2000
    Posts
    620
    Thanx that does help.
    Dim

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