Assalamualaikum,,,
salam blogger,,
kali ini saya akan posting kan apa yang baru saja saya tau yaitu mengenai Cara Membuat Form Login Sederhana menggunakan VB Net 2008 dan ini cocok untuk pemula atau dasar,
Ok langsung aja pertama kali yang di lakukan ya,,, kita buka VB.Net 2008, lalu desain formnya seperti berikut ;
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
ProgressBar1.Value = ProgressBar1.Value + 1
If ProgressBar1.Value = 100 Then
Timer1.Stop()
Form1.Show()
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Username.Text = "Igaph" And Password.Text = "1234" Then
Timer1.Start()
Else
MsgBox("Username dan password Anda Salah")
Username.Text = ""
Password.Text = ""
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim q As Integer
q = MsgBox("Apakah Anda ingin Keluar ?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Data Penjualan")
If q = vbYes Then
Close()
End If
End Sub
Private Sub Password_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Password.KeyPress
Dim t As Integer = Asc(e.KeyChar)
If t = 13 Then
If Username.Text = "Igaph" And Password.Text = "1234" Then
Timer1.Start()
Else
MsgBox("Username dan password Anda Salah")
Username.Text = ""
Password.Text = ""
End If
End If
End Sub
Demikianlah postingan mengenai Cara Membuat Form Login Menggunakan VB Net 2008,,
jika terdapat kesulitan, anda bisa koment di bawah,, :D
saya akhiri Assalamualaikum,,, :D