Bagi teman2 yang ingin belajar tentang pemrograman khususnya Vb.Net
nie saya kasih bahan untuk bisa jadi referensi teman2 sekalian tentang
bagaimana cara membuat form login tanpa database dengan menggunakan
bahasa pemrograman Vb.Net 2008. Langkah-langkah yang harus teman2
lakukan adalah meletakkan 2 buah label, 2 buah textbox, dan 3 buah
button.Desain seperti pada ganbar dibawah ini. Sedangkan untuk Source
codenya teman2 bisa Copas deh silakan saja.
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Call kosong()
End Sub
Sub kosong()
TextBox1.text = “”
TextBox2.Text = “”
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = “” And TextBox2.Text = “” Then
MsgBox(“User Name & Password Harus Di Isi”, MsgBoxStyle.OkOnly, “Perhatian”)
Else
If TextBox1.Text = “” Then
MsgBox(“User Name Belum Di Isi”, MsgBoxStyle.OkOnly, “Perhatian”)
Else
If TextBox2.Text = “” Then
MsgBox(“Password Belum Di Isi”, MsgBoxStyle.OkOnly, “Perhatian”)
Else
If TextBox1.Text = “cloudzail” And TextBox2.Text = “awan” Then
MsgBox(“Welcome”, MsgBoxStyle.OkOnly, “Sukses”)
Form2.Show()
Call kosong()
Me.Hide()
Else
MsgBox(“User Name / Password yang Anda Masukkan Salah”, MsgBoxStyle.OkOnly, “Perhatian”)
Call kosong()
End If
End If
End If
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Call kosong()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
End
End Sub
End Class
sumber :http://cloudzail.wordpress.com/2012/12/02/
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Call kosong()
End Sub
Sub kosong()
TextBox1.text = “”
TextBox2.Text = “”
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = “” And TextBox2.Text = “” Then
MsgBox(“User Name & Password Harus Di Isi”, MsgBoxStyle.OkOnly, “Perhatian”)
Else
If TextBox1.Text = “” Then
MsgBox(“User Name Belum Di Isi”, MsgBoxStyle.OkOnly, “Perhatian”)
Else
If TextBox2.Text = “” Then
MsgBox(“Password Belum Di Isi”, MsgBoxStyle.OkOnly, “Perhatian”)
Else
If TextBox1.Text = “cloudzail” And TextBox2.Text = “awan” Then
MsgBox(“Welcome”, MsgBoxStyle.OkOnly, “Sukses”)
Form2.Show()
Call kosong()
Me.Hide()
Else
MsgBox(“User Name / Password yang Anda Masukkan Salah”, MsgBoxStyle.OkOnly, “Perhatian”)
Call kosong()
End If
End If
End If
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Call kosong()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
End
End Sub
End Class
sumber :http://cloudzail.wordpress.com/2012/12/02/
0 Response to "Cara Membuat Form Login Tanpa Database di Vb.Net"
Post a Comment