Advertisement
Guest User

Login[uel]

a guest
Oct 19th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.91 KB | None | 0 0
  1. Public Class Form1
  2. Dim user, pass, pass1 As String
  3. Dim userLog, passLog As String
  4.  
  5. Private Sub Button1_Click_1(sender As Object, e As EventArgs) Handles Button1.Click
  6. If txtboxPassS.UseSystemPasswordChar = True And txtboxConfirmpass.UseSystemPasswordChar = True Then
  7. txtboxPassS.UseSystemPasswordChar = False
  8. txtboxConfirmpass.UseSystemPasswordChar = False
  9. Else
  10. txtboxPassS.UseSystemPasswordChar = True
  11. txtboxConfirmpass.UseSystemPasswordChar = True
  12. End If
  13. End Sub
  14.  
  15. Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  16. Dim x As Integer
  17. MsgBox("Welcome to uel x forum")
  18. x = MsgBox("Do you already have account?", MessageBoxButtons.YesNo)
  19. If x = DialogResult.Yes Then
  20. pnlLogin.Visible = True
  21. user = "admin"
  22. pass = "admin"
  23. Else
  24. pnlSignUp.Visible = True
  25. End If
  26. End Sub
  27.  
  28. Private Sub Button2_Click(sender As Object, e As EventArgs) Handles btnLogin.Click
  29. userLog = txtboxName.Text
  30. passLog = txtboxPass.Text
  31. If userLog = user And passLog = pass Then
  32. Me.Hide()
  33. Form2.Show()
  34. ElseIf userLog = user And passLog <> pass Then
  35. MsgBox("Wrong Password")
  36. ElseIf userLog <> user And passLog = pass Then
  37. MsgBox("Wrong Username")
  38. ElseIf userLog <> user And passLog <> pass Then
  39. MsgBox("Wrong credentials")
  40. End If
  41. End Sub
  42.  
  43. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles btnSignUp.Click
  44. user = txtboxNameS.Text
  45. pass = txtboxPassS.Text
  46. pass1 = txtboxConfirmpass.Text
  47.  
  48. If pass1 = pass Then
  49. MsgBox("Continue to login page", MessageBoxButtons.OK)
  50. pnlSignUp.Visible = False
  51. pnlLogin.Visible = True
  52. ElseIf pass1 <> pass Then
  53. MsgBox("Wrong Password")
  54. End If
  55. End Sub
  56.  
  57. Private Sub Button2_Click_1(sender As Object, e As EventArgs) Handles Button2.Click
  58. If txtboxPass.UseSystemPasswordChar = True Then
  59. txtboxPass.UseSystemPasswordChar = False
  60. Else
  61. txtboxPass.UseSystemPasswordChar = True
  62. End If
  63. End Sub
  64. Private Sub txtboxPass_GotFocus(sender As Object, e As EventArgs) Handles txtboxPass.GotFocus
  65. txtboxPass.UseSystemPasswordChar = True
  66. End Sub
  67. Private Sub txtboxPassS_GotFocus(sender As Object, e As EventArgs) Handles txtboxPassS.GotFocus
  68. txtboxPassS.UseSystemPasswordChar = True
  69. End Sub
  70. Private Sub txtboxConfirmpass_GotFocus(sender As Object, e As EventArgs) Handles txtboxConfirmpass.GotFocus
  71. txtboxConfirmpass.UseSystemPasswordChar = True
  72. End Sub
  73. End Class
  74. Public Class Form2
  75. Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  76. End Sub
  77. Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles Timer1.Tick
  78. Timer1.Interval = 1
  79. Label1.Left = Label1.Left - 1
  80. If Label1.Right = 0 Then
  81. Label1.Left = Me.Width + 1
  82. End If
  83. End Sub
  84.  
  85. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement