VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



An easy way to use password for textbox.

by Masood Siddiqui (2 Submissions)
Category: String Manipulation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 2nd December 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

An easy way to use password for textbox.

Rate An easy way to use password for textbox.



Object Property Setting

Text1  Text           (Empty)
 PasswordChar    *
Label1  Caption    “Enter your password within 15 seconds.”
Command1 Caption    “Try Password”
Timer1  Interval    15000
 Enabled    True (default setting)
Form1  Caption    “Password”

To create the code
1. On the form, double-click the timer.
2. Type the following statements in the Timer1_Timer event   
                procedure:
        3.      In the timer_1Timer type the following code.

MsgBox ("Sorry, your time is up.")
End

If Text1.Text = "secret" Then
    Timer1.Enabled = False
    MsgBox ("Welcome to the system!")
    End
Else
    MsgBox ("Sorry, friend, I don’t know you.")
End If


Download this snippet    Add to My Saved Code

An easy way to use password for textbox. Comments

No comments have been posted about An easy way to use password for textbox.. Why not be the first to post a comment about An easy way to use password for textbox..

Post your comment

Subject:
Message:
0/1000 characters