Source : bekabe.blogspot.com
Ini Dia Codenyhaaa:
'From Login
'Palangka Raya, 28/4/2011, 1:40 PM (WIB)
'Riyan Hidayat Samosir @ BeKaBe.BlogSpot.Com - Belajar Visual Basic _ Form Login
'Tambahkan: 2 buah Label, 3 buah TextBox, 1 buah CommandButton
Dim SalahPassWord_ke_i_kali As Integer
Private Sub Form_Load()
SalahPassWord_ke_i_kali = 0
Me.Caption = "Form login"
Me.Text3.Visible = False
End Sub
Private Sub Command1_Click()
If Me.Text2.Text = Me.Text3.Text Then
MsgBox "Selamat datang!"
Me.Caption = "Sukses login"
Else
SalahPassWord_ke_i_kali = SalahPassWord_ke_i_kali + 1
MsgBox "Anda salah memasukkan PassWord " & SalahPassWord_ke_i_kali & " kali"
Me.Caption = "Form login"
If SalahPassWord_ke_i_kali = 2 Then
MsgBox "Kesempatan Anda 1 kali lagi"
End If
If SalahPassWord_ke_i_kali = 3 Then
Me.Caption = "Gagal login"
MsgBox "Anda sudah salah memasukkan PassWord 3 kali, maka proses ini akan ditutup!"
End
End If
End If
End Sub
Credit:Code by BeKaBe
Update : Contoh :
Contoh Form Login.zip
'From Login
'Palangka Raya, 28/4/2011, 1:40 PM (WIB)
'Riyan Hidayat Samosir @ BeKaBe.BlogSpot.Com - Belajar Visual Basic _ Form Login
'Tambahkan: 2 buah Label, 3 buah TextBox, 1 buah CommandButton
Dim SalahPassWord_ke_i_kali As Integer
Private Sub Form_Load()
SalahPassWord_ke_i_kali = 0
Me.Caption = "Form login"
Me.Text3.Visible = False
End Sub
Private Sub Command1_Click()
If Me.Text2.Text = Me.Text3.Text Then
MsgBox "Selamat datang!"
Me.Caption = "Sukses login"
Else
SalahPassWord_ke_i_kali = SalahPassWord_ke_i_kali + 1
MsgBox "Anda salah memasukkan PassWord " & SalahPassWord_ke_i_kali & " kali"
Me.Caption = "Form login"
If SalahPassWord_ke_i_kali = 2 Then
MsgBox "Kesempatan Anda 1 kali lagi"
End If
If SalahPassWord_ke_i_kali = 3 Then
Me.Caption = "Gagal login"
MsgBox "Anda sudah salah memasukkan PassWord 3 kali, maka proses ini akan ditutup!"
End
End If
End If
End Sub
Credit:Code by BeKaBe
Update : Contoh :
Contoh Form Login.zip
mantap neg gan,,,klo ak lg buat KRS Online ne gan,,,
ReplyDeleteapa itu KRS Online?
ReplyDelete