Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

SYNTAX

Tombol Exit
Me.Close()

CheckBox
If CheckBox1.Checked = True Then
My.Settings.username = TextBox1.Text
My.Settings.password = TextBox2.Text
My.Settings.Save()
My.Settings.Reload()
End If

Form
TextBox1.Text = My.Settings.username
TextBox2.Text = My.Settings.password

Tombol Login

Dim Username As New My.MySettings()


Dim Password As New My.MySettings()
If TextBox1.Text = "" And TextBox2.Text = "" Then
MsgBox("Silahkan Masukkan Username dan Password Anda!",
MsgBoxStyle.Critical, "Error!")
ElseIf TextBox1.Text = "[username]" And TextBox2.Text =
"[Password]" Then
MsgBox("Selamat Datang")
TextBox1.Text = ""
TextBox2.Text = ""
Else
MsgBox("Username dan Password yang Anda Masukkan Salah!",
MsgBoxStyle.Critical, "Error!")
TextBox1.Text = ""
TextBox2.Text = ""
End If

You might also like