Private Sub Form_Activate()
Text1. MaxLength = 8
Text2. MaxLength = 8
Text1. SetFocus
End Sub
Private Sub Form_Load()
‘Mendisable-kan menu utama dan submenunya.
MainMenu.mnData = False
MainMenu.mnLaporan = False
MainMenu.smLogin = False
Main Menu.sm Logout = False
Private Sub Text1_KeyPress (keyascii As Integer)
If keyascii = 13 Then
Text2.SetFocus
End If
End Sub
Private Sub Text2_KeyPress (keyascii As Integer)
If keyascii = 13 Then
Command1_Click
End If
End Sub
Private Sub Command1_Click()
If Text1.Text = ‘Admin’ and Text2.Text = “zf_1221” Then
‘Mengenable-kan menu utama dan submenunya kecuali menu login.
MainMenu.mAdmin = True
MainMenu.mnData = True
MainMenu.mnLaporan = True
MainMenu.smLogin = False
Main Menu.sm Logout = True
Unload Me
ElseIf If Text1.Text = ‘’ and Text2.Text = “” Then
Pesan = MsgBox(“Woiy, form login musti diisi tuch…!!”, -
0, “informasi”)
Text1.SetFocus
Else
Pesan = MsgBox(“Anda tidak berhak mengakses program ini”, -
0, “Akses diTOLAK…!!”)
Text1.SetFocus
End If
End Sub
Ohya, baca juga artikel: Nissan X-trail Mobil SUV Tangguh dan Sporty Terbaikkungannya yach....!!
:)
Go : Home > visual basic > Aplikasi Login VB Tanpa Database
Aplikasi Login VB Tanpa Database
Diposting oleh
admin
|
Label:
visual basic
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar