Public Class forgot

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        qry("select * from login")
        dr.Read()
        If dr.Item(1).ToString = TextBox1.Text Then
        Else
            MsgBox("Wrong old password")
            Exit Sub
        End If
        qry1("update login set pass='" & TextBox2.Text & "'")
        MsgBox("updated")


        login.Show()
        Me.Hide()
    End Sub
End Class