Simple Password Field Example tutorial - Visual Basic 2010

Опубликовано: 26 Апрель 2026
на канале: Mosch Dev
4,094
13

In this video you will learn how to make a simple password field from two textboxs. The textboxs combined with a button check if the password is correct. Also includes a checkbox to show password!

here is the code:
check button

If TextBox1.Text = TextBox2.Text Then
MsgBox("Password correct")

ElseIf TextBox1.Text = TextBox2.Text = False Then
MsgBox("Password incorrect, RETRY!")

End If

checkbox changed

If CheckBox1.Checked = True Then
TextBox1.PasswordChar = ""
TextBox2.PasswordChar = ""
ElseIf CheckBox1.Checked = False Then
TextBox1.PasswordChar = "*"
TextBox2.PasswordChar = "*"
End If