Untuk Mengikuti Tutorial Lengkap Visual Basic 2010 kali ini anda harus sudah mengikuti :
- Membuat Project Baru VB Net 2010
- Membuat Form Menu Utama Vb Net 2010
- Source Code Menu Utama VB Net 2010
- Membuat Form Login VB Net 2010
- Membuat Database MS Access
- Membuat Module VB Net 2010
Berikut Source Codenya :
Imports System.Data.OleDb
Public Class formLogin
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = Chr(13) Then TextBox2.Focus()
End Sub
Private Sub TextBox2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox2.KeyPress
If e.KeyChar = Chr(13) Then Button1.Focus()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Then
MsgBox("data login belum lengkap")
Exit Sub
Else
Call Koneksi()
CMD = New OleDbCommand("select * from admin where kodeadmin='" & TextBox1.Text & "' and passwordadmin='" & TextBox2.Text & "'", CONN)
RD = CMD.ExecuteReader
RD.Read()
If RD.HasRows Then
Me.Close()
FormMenuUtama.Show()
Call Terbuka()
Else
MsgBox("Kode Admin atau Password salah")
End If
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
End Sub
Private Sub formLogin_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TextBox1.MaxLength = 6
TextBox2.PasswordChar = "X"
End Sub
Sub Terbuka()
FormMenuUtama.LoginToolStripMenuItem.Enabled = False
FormMenuUtama.LogoutToolStripMenuItem.Enabled = True
FormMenuUtama.MasterToolStripMenuItem.Enabled = True
FormMenuUtama.TransaksiToolStripMenuItem.Enabled = True
FormMenuUtama.LaporanToolStripMenuItem.Enabled = True
FormMenuUtama.UtilityToolStripMenuItem.Enabled = True
End Sub
End Class
Anda bisa mendownload Pembelajaran ini dengan KLIK LINK DISINI
KLIK LINK INI - STEP BY STEP MEMBUAT APLIKASI PERPUS DENGAN VB 2010
Salam Pembelajar
Pintar VB | Powered by Tunas Media Indonesia
Update Contact :
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email : Fajarudinsidik@gmail.com
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email: Fajarudinsidik@gmail.com
atau Kirimkan Private messanger melalui email dengan klik tombol order dibawah ini :