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, "Absensi Karyawan")
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 = "Sari" And Password.Text = "1234" Then
Timer1.Start()
Else
MsgBox("Username dan password Anda Salah")
Username.Text = ""
Password.Text = ""
End If
End If
End Sub
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, "Absensi Karyawan")
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 = "Sari" And Password.Text = "1234" Then
Timer1.Start()
Else
MsgBox("Username dan password Anda Salah")
Username.Text = ""
Password.Text = ""
End If
End If
End Sub
Selamat menikmati ilmu yang diperoleh.



Tidak ada komentar:
Posting Komentar