Public Class Security
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
MsgBox("Login to confirm your identity.", MsgBoxStyle.Information, "Security")
TextBox2.UseSystemPasswordChar = True
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MsgBox("Bye", MsgBoxStyle.OkOnly, "Signed out")
Me.Close()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim oForm2 As New Question
If Timer1.Enabled = False Then
MsgBox("One moment, validating...")
Timer1.Enabled = True
ElseIf Timer1.Enabled = True Then
Timer1.Enabled = False
MsgBox("Successfully validated")
Me.Hide()
oForm2.Show()
End If
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If TextBox1.Text = "thefomor" And TextBox2.Text = "~password~" Then
Button2_Click(sender, e)
Else
MsgBox("Wrong user/password")
Me.Close()
End If
End Sub
End Class
Public Class Question
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim oForm As New Main
If ComboBox1.Text = "Favorite movie" And TextBox1.Text = "iamlegend" Then
oForm.Show()
Me.Hide()
MsgBox("Welcome to the database.")
ElseIf ComboBox1.Text = "Best friends name" And TextBox1.Text = "keyshawn" Then
Button3_Click(sender, e)
ElseIf ComboBox1.Text = "Favorite place" And TextBox1.Text = "football" Then
Button4_Click(sender, e)
Else
Me.Close()
MsgBox("Wrong answer")
Me.Close()
End If
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim oForm As New Main
If ComboBox1.Text = "Best friends name" And TextBox1.Text = "keyshawn" Then
Timer1.Enabled = False
oForm.Show()
Me.Hide()
MsgBox("Welcome to the database.")
ElseIf ComboBox1.Text = "Favorite place" And TextBox1.Text = "football" Then
Button4_Click(sender, e)
ElseIf ComboBox1.Text = "Favorite movie" And TextBox1.Text = "iamlegend" Then
Button2_Click(sender, e)
Else
Me.Close()
MsgBox("Wrong answer")
End If
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim oForm As New Main
If ComboBox1.Text = "Favorite place" And TextBox1.Text = "football" Then
oForm.Show()
Me.Hide()
MsgBox("Welcome to the database.")
ElseIf ComboBox1.Text = "Favorite place" And TextBox1.Text = "football" Then
Button3_Click(sender, e)
ElseIf ComboBox1.Text = "Favorite movie" And TextBox1.Text = "iamlegend" Then
Button4_Click(sender, e)
Else
Me.Close()
MsgBox("Wrong answer")
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Close()
End Sub
End Class
Public Class Main
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Me.Close()
MsgBox("Still under development")
End Sub
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim oForm As New Database
Me.Hide()
oForm.Show()
End Sub
End Class
If TextBox1.Text = "thefomor" And TextBox2.Text = "~password~" Then


