Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Dim user, pass, pass1 As String
- Dim userLog, passLog As String
- Private Sub Button1_Click_1(sender As Object, e As EventArgs) Handles Button1.Click
- If txtboxPassS.UseSystemPasswordChar = True And txtboxConfirmpass.UseSystemPasswordChar = True Then
- txtboxPassS.UseSystemPasswordChar = False
- txtboxConfirmpass.UseSystemPasswordChar = False
- Else
- txtboxPassS.UseSystemPasswordChar = True
- txtboxConfirmpass.UseSystemPasswordChar = True
- End If
- End Sub
- Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- Dim x As Integer
- MsgBox("Welcome to uel x forum")
- x = MsgBox("Do you already have account?", MessageBoxButtons.YesNo)
- If x = DialogResult.Yes Then
- pnlLogin.Visible = True
- user = "admin"
- pass = "admin"
- Else
- pnlSignUp.Visible = True
- End If
- End Sub
- Private Sub Button2_Click(sender As Object, e As EventArgs) Handles btnLogin.Click
- userLog = txtboxName.Text
- passLog = txtboxPass.Text
- If userLog = user And passLog = pass Then
- Me.Hide()
- Form2.Show()
- ElseIf userLog = user And passLog <> pass Then
- MsgBox("Wrong Password")
- ElseIf userLog <> user And passLog = pass Then
- MsgBox("Wrong Username")
- ElseIf userLog <> user And passLog <> pass Then
- MsgBox("Wrong credentials")
- End If
- End Sub
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles btnSignUp.Click
- user = txtboxNameS.Text
- pass = txtboxPassS.Text
- pass1 = txtboxConfirmpass.Text
- If pass1 = pass Then
- MsgBox("Continue to login page", MessageBoxButtons.OK)
- pnlSignUp.Visible = False
- pnlLogin.Visible = True
- ElseIf pass1 <> pass Then
- MsgBox("Wrong Password")
- End If
- End Sub
- Private Sub Button2_Click_1(sender As Object, e As EventArgs) Handles Button2.Click
- If txtboxPass.UseSystemPasswordChar = True Then
- txtboxPass.UseSystemPasswordChar = False
- Else
- txtboxPass.UseSystemPasswordChar = True
- End If
- End Sub
- Private Sub txtboxPass_GotFocus(sender As Object, e As EventArgs) Handles txtboxPass.GotFocus
- txtboxPass.UseSystemPasswordChar = True
- End Sub
- Private Sub txtboxPassS_GotFocus(sender As Object, e As EventArgs) Handles txtboxPassS.GotFocus
- txtboxPassS.UseSystemPasswordChar = True
- End Sub
- Private Sub txtboxConfirmpass_GotFocus(sender As Object, e As EventArgs) Handles txtboxConfirmpass.GotFocus
- txtboxConfirmpass.UseSystemPasswordChar = True
- End Sub
- End Class
- Public Class Form2
- Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- End Sub
- Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles Timer1.Tick
- Timer1.Interval = 1
- Label1.Left = Label1.Left - 1
- If Label1.Right = 0 Then
- Label1.Left = Me.Width + 1
- End If
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement