Kali ini saya akan membagikan pengetahuan saya tentang bagaiman cara membuat form login sederhana menggunakan VB 6.0.
If text1.Text = "" And text2.Text = "" Then
MsgBox "User dan Password Belum diisi"
ElseIf text1.Text = "" Then
MsgBox " User anda Belum diisi"
ElseIf text2.Text = "" Then
MsgBox " Password Anda Belum diisi"
ElseIf text1.Text = "" And text2.Text = "" Then
MsgBox " User dan Password Anda Belum Diisi"
ElseIf text1.Text = "dedi" And text2.Text = "1234" Then
MsgBox "Login Berhasil"
ElseIf text1.Text <> "dedi" And text2.Text = "1234" Then
MsgBox "User Anda Salah"
ElseIf text1.Text = "dedi" And text2.Text <> "1234" Then
MsgBox "Password Anda Salah"
Else
MsgBox "Gagal Masuk"
End If
End Sub
Private Sub Command2_Click()
End
End Sub
SEMOGA BERMANFAAT....!!!
- Buat tampilan Form seperti gambar di bawah ini:
- Lalu Copy Paste coding di bawah ini:
If text1.Text = "" And text2.Text = "" Then
MsgBox "User dan Password Belum diisi"
ElseIf text1.Text = "" Then
MsgBox " User anda Belum diisi"
ElseIf text2.Text = "" Then
MsgBox " Password Anda Belum diisi"
ElseIf text1.Text = "" And text2.Text = "" Then
MsgBox " User dan Password Anda Belum Diisi"
ElseIf text1.Text = "dedi" And text2.Text = "1234" Then
MsgBox "Login Berhasil"
ElseIf text1.Text <> "dedi" And text2.Text = "1234" Then
MsgBox "User Anda Salah"
ElseIf text1.Text = "dedi" And text2.Text <> "1234" Then
MsgBox "Password Anda Salah"
Else
MsgBox "Gagal Masuk"
End If
End Sub
Private Sub Command2_Click()
End
End Sub
SEMOGA BERMANFAAT....!!!

0 comments:
Posting Komentar