Advertisement
kshadow22

Two Simple Log In Forms Visual Basic

Jun 30th, 2015
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Class Form1
  2.  
  3.     Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
  4.  
  5.     End Sub
  6.     Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
  7.  
  8.     End Sub
  9.  
  10.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  11.         If My.Settings.Username = TextBox1.Text Then
  12.             If My.Settings.Password = TextBox2.Text Then
  13.                 MessageBox.Show("You have been granted access!")
  14.                 Form2.Show()
  15.                 GoTo EndOfScript
  16.             End If
  17.         End If
  18.         MessageBox.Show("Log In Failed")
  19. EndOfScript:
  20.     End Sub
  21.  
  22.     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  23.         If TextBox1.Text = "subscribe" Then
  24.             If TextBox2.Text = "kshadow22" Then
  25.                 MessageBox.Show("You have been granted access!")
  26.                 Form2.Show()
  27.                 GoTo EndOfScript
  28.             End If
  29.         End If
  30.         MessageBox.Show("Log In Failed")
  31. EndOfScript:
  32.     End Sub
  33. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement