PERTEMUAN 3 : 23 ~ FEBRUARI ~ 2015 : CARA MEMBUAT FORM LOGIN TANPA DATABASE DI VB 2010

6:58 PM
CARA MEMBUAT FORM LOGIN TANPA DATABASE DI VB 2010




Assalamualaikum.Wr.Wb

    Pada kesempatan kali ini saya akan berbagi cara bagaimana membuat Form Login tanpa menggunakan database di vb 2010 . Untuk script nya sih sama saja dengan vb yang sebelum sebelumnya. Untuk lebih jelasnya berikut ini adalah langkah-langkahnya :


1. Buka Visual Basic 2010 anda seperti gambar di bawah ini
                



2.  Kemudian klik  " New project " Seperti gambar di bawah ini




 3. Setelah  di klik maka akan mucul gambar di bawah ini kemudian klik " Windows Form Application "





 4. Kemudian akan muncul form kosong seperti gambar di bawah ini




 5. Setelah itu anda sorot ke arah kiri pada form ada atau cari " Toolbox" kemudian pilih " Button " , " TextBox ", " Label " seperti gambar di bawah ini





6. Setelah itu akan muncul sebuah button seperti gambar di bawah ini




7. Kemudian copy script di bawah ini

Public Class Form3

    Private Sub Form3_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 = "admin" And TextBox2.Text = "admin" Then
                        MsgBox("Welcome", MsgBoxStyle.OkOnly, "WELCOME TO FORM 4")
                        Form4.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
 

Catatan : " Anda harus membuat form satu lagi untuk masuk ke dalam form admin tersebut "

8. Maka hasil akhirnya seperti gambar di bawah ini


Selamat mencoba ... (^_^)

幸運を...
(^_^)

Artikel Terkait

Previous
Next Post »

Formulir Kontak

Name

Email *

Message *