Public Class LoginForm2
    Dim db_informatique4 As New class4
    Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
        db_informatique4.Myreq = "select*from entrer where username='" & t1.Text & "'"
        db_informatique4.Connecting_in_informatique()
        Do While db_informatique4.rdr.Read
            If t2.Text = (db_informatique4.rdr(1).ToString) Then
              
                    Me.Hide()
                    Form1.Show()

            Else
                PictureBox1.Visible = False
            End If

        Loop
        db_informatique4.Disconnecting_in_informatique()



    End Sub

    Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click
        Me.Close()
    End Sub

    Private Sub LoginForm1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        t1.Focus()

        Timer1.Start()

        db_informatique4.Myreq = "select*from entrer where type ='" & "الادارة" & "'"
        db_informatique4.Connecting_in_informatique()
        t1.Items.Clear()
        Do While db_informatique4.rdr.Read
            t1.Items.Add(db_informatique4.rdr(0).ToString)

        Loop
        db_informatique4.Disconnecting_in_informatique()
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        ProgressBar1.PerformStep()
        Label1.Text = "....جاري تحميل البيانات  "
        If ProgressBar1.Value = ProgressBar1.Maximum Then

            If ProgressBar1.Value = ProgressBar1.Maximum Then

                Timer1.Enabled = False

                Label1.Text = "تم تحميل البيانات بنجاح"

            End If
        End If
    End Sub
End Class
