1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Visual Basic Help

Discussion in 'Software Development' started by syntaxerr, Oct 28, 2002.

Thread Status:
Not open for further replies.
Advertisement
  1. syntaxerr

    syntaxerr Thread Starter

    Joined:
    Mar 21, 2002
    Messages:
    226
    I am writing a simple little program for school, and it turns out that it is not as simple as I thought it would be. Here is my problem:
    I have a text box named txtPass, and I need to make the contents of the text property invisible. I was told to declare the the global variable of sPass and have it capture all the characters of the txtPass text box. I'm probably making this sound harder than it is, but in other words, i just need the password to be invisible when it is typed into the text box. Anyone know how to do this?
     
  2. gaorr

    gaorr

    Joined:
    Oct 21, 2002
    Messages:
    47
    You can set the 'password' propery of the textbox to * and each character that the user types into the textbox will be displayed as * (or any other symbol you choose).

    Don't know how to make it invisible though.

    Hope this helps.

    gaorr
     
  3. fpat

    fpat

    Joined:
    Nov 4, 2000
    Messages:
    139
    You could set the password property of the text box to a blank space by pressing the space bar (instead of * or another character). Altenatively you could add the following to your code after setting the text property to blank:

    Private Sub Text1_Change()
    Text1.PasswordChar = Chr(32)
    End Sub

    Either method will move the cursor, but will not show any character.
     
  4. gaorr

    gaorr

    Joined:
    Oct 21, 2002
    Messages:
    47
    excellent !!!
     
  5. Mosaic1

    Mosaic1

    Joined:
    Aug 17, 2001
    Messages:
    7,486
    Text1.ForeColor = Text1.BackColor
     
  6. fpat

    fpat

    Joined:
    Nov 4, 2000
    Messages:
    139
    All kinds of ways to skin that cat.
     
  7. asbo

    asbo

    Joined:
    Sep 21, 2001
    Messages:
    507
    Hmm... What about something like this?

    Code:
    [COLOR=green]'Globals & Decs[/color]
    [U][COLOR=blue]Dim[/color] strPass [COLOR=blue]as[/color] String                                                                [/u]
    [color=blue]Private Sub [/color]txtPass_Change()
        strPass = strPass & txtPass.Text
        txtPass.Text = ""
    [COLOR=blue]End Sub[/color]
    
    Only problem is there's no backspace..... :D
     
  8. del84

    del84

    Joined:
    Dec 19, 2002
    Messages:
    1
    i was wondering if there was anyone online now that would be willing to give me some help with a few vb questions.
     
  9. AbvAvgUser

    AbvAvgUser

    Joined:
    Oct 3, 2002
    Messages:
    2,281
    del84:
    Instead of keeping this in an already running thread, start a new thread with your problem and you may have many replies from the people willing to help.
     
  10. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/101611

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice