求助VB.NET设计登录密码修改界面
Public Class LongFrm
Public PASS As Boolean
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Application.Exit()
PASS = False
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
PASS = False
Dim UID As String
Dim Paw As String
UID = Me.TextBox1.Text
Paw = Me.TextBox2.Text
If UID <> "" And Paw <> "" Then
If MainConfig.ExcuteLong("select * from UserID Where UserID = '" + UID + "' AND PASSWORD = '" + Paw + "'") >= 1 Then
Me.Close()
PASS = True
Else
MessageBox.Show("密码不正确")
PASS = False
Return
End If
End If
End Sub
End Class
这个是登录界面的代码,请教下如何在系统设置菜单中建立一个密码修改界面,求代码
[解决办法]
添加一个窗体,添加各种空间后,在设置菜单命令的代码中用form.showdialog来显示添加的那个窗体就行啦
[解决办法]
UPDATE UserID SET PASSWORD = '" & NEWPASSWORD & "' WHERE UserID = '" & USERID &"' AND PASSWORD = '" & OLDPASSWORD &"'"