Results 1 to 6 of 6

Thread: Creating a password box in vb with textbox control?

  1. #1
    Join Date
    Jan 2009
    Posts
    18

    Creating a password box in vb with textbox control?

    Hi,

    I want to create a password box I am using textbox control for this but dont know how to hide the characters after input & display asterisks?

  2. #2
    Join Date
    Jun 2008
    Posts
    144

    Re: Creating a password box in vb with textbox control?

    Found the passwordCharacter of a text box.

  3. #3
    Join Date
    Jun 2008
    Posts
    97

    Re: Creating a password box in vb with textbox control?

    To create a password text box

    Set the PasswordChar property of the TextBox control to a specific character.
    The PasswordChar property specifies the character displayed in the text box. For example, if you want asterisks displayed in the password box, specify * for the PasswordChar property in the Properties window. Then, regardless of what character a user types in the text box, an asterisk is displayed.

  4. #4
    Join Date
    May 2008
    Posts
    44

    Re: Creating a password box in vb with textbox control?

    i have decided to make a password box to open another form i got the part where it asks you the password and brings you the form. is there any way if you have a message box for it to display them in the form of "************" in an input box. also is there any way i could read from a text file just change that and that will change the password and i have to enter that to get in.

    Code:
       1.      'This Is The Password Dialog Box
       2.      Dim PassBox As String, Lowercase As String
       3.       
       4.      PassBox = UCase(InputBox("Please Enter The Password", "Password Entry"))
       5.      Select Case PassBox
       6.       
       7.      Case "TEST" 'password
       8.      frmpass.Visible = False
       9.      frmmain.Enabled = True
      10.      frmmain.Visible = True
      11.       
      12.       
      13.      Case Else
      14.      MsgBox "Incorrect Password", , "Password"
      15.       
      16.      End Select
      17.      End Sub

  5. #5
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Creating a password box in vb with textbox control?

    Creating a Password Text Box
    A password box is a text box that allows a user to type in his or her password while displaying placeholder characters, such as asterisks. Visual Basic provides two text box properties, PasswordChar and MaxLength, which make it easy to create a password text box.

    PasswordChar specifies the character displayed in the text box. For example, if you want asterisks displayed in the password box, you specify * for the PasswordChar property in the Properties window. Regardless of what character a user types in the text box, an asterisk is displayed. With MaxLength, you determine how many characters can be typed in the text box. After MaxLength is exceeded, the system emits a beep and the text box does not accept any further characters.

  6. #6
    Join Date
    Mar 2012
    Posts
    1

    Re: Creating a password box in vb with textbox control?

    Quote Originally Posted by kelfro View Post
    Creating a Password Text Box
    A password box is a text box that allows a user to type in his or her password while displaying placeholder characters, such as asterisks. Visual Basic provides two text box properties, PasswordChar and MaxLength, which make it easy to create a password text box.

    PasswordChar specifies the character displayed in the text box. For example, if you want asterisks displayed in the password box, you specify * for the PasswordChar property in the Properties window. Regardless of what character a user types in the text box, an asterisk is displayed. With MaxLength, you determine how many characters can be typed in the text box. After MaxLength is exceeded, the system emits a beep and the text box does not accept any further characters.
    http://msdn.microsoft.com/en-us/library/d3223ht2.aspx
    Thats a complete C&P what a skid....

Similar Threads

  1. Creating Windows Ribbon-like control using RB code
    By Olivia in forum Windows Software
    Replies: 6
    Last Post: 27-07-2011, 11:50 AM
  2. Replies: 6
    Last Post: 29-06-2011, 06:53 PM
  3. Replies: 2
    Last Post: 20-08-2010, 01:23 AM
  4. Creating a Clickable URL in Textbox
    By D_chapple in forum Software Development
    Replies: 5
    Last Post: 23-02-2010, 09:52 PM
  5. How to go to the next line in asp:textbox control
    By MKAIF in forum Software Development
    Replies: 5
    Last Post: 15-02-2010, 04:38 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,565,677.11883 seconds with 16 queries