Public Class frmstudentlogin

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click


        Dim Query = "SELECT * FROM `tblstudents` WHERE `IDNO`=" & TextBox1.Text
        mySelectQuery(Query)
        Checkresult("login")

    End Sub

    Private Sub TextBox2_KeyDown(sender As Object, e As KeyEventArgs) Handles TextBox1.KeyDown
        If e.KeyCode = Keys.Enter Then
            Button2.PerformClick()
        End If
    End Sub
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Me.Close()
    End Sub
End Class