Form1 Object Eventargs: "Anda Harus Login Dulu Untuk Ke Menu Utama" "" ""

You might also like

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

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles MyBase.Load

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
Timer1.Start()
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click
MsgBox("Anda harus login dulu untuk ke menu utama", MsgBoxStyle.Information)
TextBox1.Text = ""
TextBox2.Text = ""
End Sub
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 TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles TextBox1.TextChanged
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Timer1.Tick
If TextBox1.Text = "saenep" And TextBox2.Text = "13.ka.018" Then
ProgressBar1.Increment(10)
If ProgressBar1.Value = ProgressBar1.Maximum Then
Timer1.Stop()
ProgressBar1.Value = 0
MsgBox("Silahkan Anda Masuk", MsgBoxStyle.Information)
TextBox1.Text = ""
TextBox2.Text = ""
Form2.Show()
End If
Else
Timer1.Start()
ProgressBar1.Increment(10)
If ProgressBar1.Value = ProgressBar1.Maximum Then
Timer1.Stop()
ProgressBar1.Value = 0
MsgBox("Username dan password anda salah", MsgBoxStyle.Critical)
TextBox1.Text = ""
TextBox2.Text = ""
End If
End If
End Sub

Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles TextBox2.TextChanged
End Sub

Private Sub Label5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Label5.Click

End Sub
End Class

You might also like