Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
- With ListBox1.Items
- .Add("ani")
- .Add("bobi")
- .Add("dimo")
- .Add("ivan")
- .Add("mimi")
- End With
- With ListBox2.Items
- .Add("1111")
- .Add("2222")
- .Add("3333")
- .Add("4444")
- .Add("5555")
- End With
- 'lstIme.Hide()
- 'lstPas.Hide()
- End Sub
- Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
- Dim i As Integer
- Dim x As Integer
- Dim blnExists As Boolean
- If TextBox1.Text <> "" And blnExists = False Then
- TextBox1.Text = ""
- TextBox2.Text = ""
- MsgBox("НЕВАЛИДНО ПОТРЕБИТЕЛСКО ИМЕ", vbInformation, "Съобщение")
- End If
- For i = 0 To ListBox1.Items.Count() - 1
- For x = 0 To ListBox2.Items.Count() - 1
- If TextBox1.Text = ListBox1.Items(i) Then
- ElseIf TextBox2.Text = ListBox2.Items(x) Then
- MsgBox("ПОЗДРАВИ за", vbExclamation, "СЪОБЩЕНИЕ")
- Exit For
- Else
- MsgBox("НЕВАЛИДНА ПАРОЛА", vbExclamation, "СЪОБЩЕНИЕ")
- Exit For
- End If
- Next
- Next
- End Sub
- Private Sub CheckBox1_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles CheckBox1.CheckedChanged
- If CheckBox1.Checked = True Then
- TextBox2.PasswordChar = ""
- Else
- TextBox2.PasswordChar = "*"
- End If
- End Sub
- Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
- TextBox1.Clear()
- TextBox2.Clear()
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement