Salam Sahabat Blogger..
Menuju postingan berikut ini saya teringat buka www.facebook.com alias Face The Book atau Facebook " HeHeHe " Dimana langkah awal yang harus kita lakukan adalah Login akun..
Mari sobat saatnya kita membuat Menu Login sendiri masih tetap menggunakan Visual Basic " Semangat3x.." Hemm..tapi sobat Project kali ini sedikit agak rumit dan membutuhkan ketelitian..
Semangat3x...
RezpeC N PeacE !!!
CODE
Option Explicit
Dim user As String
Dim pass As String
Public LoginSucceeded As Boolean
Private Sub cmdExit_Click()
If MsgBox("Are you sure to close this Application?", vbQuestion + vbYesNo, "System") = vbYes Then
End
End If
End Sub
Private Sub cmdLogin_Click()
user = "admin"
pass = "12345"
If txtUserName.Text = user Then
If txtPassword.Text = pass Then
MsgBox "Username and Password Accepted!", vbInformation, "Login"
'You may change this line here. call the form rather than displaying a message box!
ElseIf txtPassword.Text = "" Then
MsgBox "Password Field Empty!", vbExclamation, "Login"
Else
MsgBox "Username and Password not Matched!", vbExclamation, "Login"
End If
ElseIf txtUserName.Text = "" Then
MsgBox "Username Field Empty!", vbExclamation, "Login"
Else
MsgBox "Invalid Username, try again!", , "Login"
txtPassword.SetFocus
End If
End Sub
Option Explicit
Dim user As String
Dim pass As String
Public LoginSucceeded As Boolean
Private Sub cmdExit_Click()
If MsgBox("Are you sure to close this Application?", vbQuestion + vbYesNo, "System") = vbYes Then
End
End If
End Sub
Private Sub cmdLogin_Click()
user = "admin"
pass = "12345"
If txtUserName.Text = user Then
If txtPassword.Text = pass Then
MsgBox "Username and Password Accepted!", vbInformation, "Login"
'You may change this line here. call the form rather than displaying a message box!
ElseIf txtPassword.Text = "" Then
MsgBox "Password Field Empty!", vbExclamation, "Login"
Else
MsgBox "Username and Password not Matched!", vbExclamation, "Login"
End If
ElseIf txtUserName.Text = "" Then
MsgBox "Username Field Empty!", vbExclamation, "Login"
Else
MsgBox "Invalid Username, try again!", , "Login"
txtPassword.SetFocus
End If
End Sub
Ganti teks ini dengan informasi mengenai permalink atau apapun di sini.
Tidak ada komentar:
Posting Komentar