修改密码代码
1.在formlogin1窗体中为原始密码2.在formMM窗体中如下:旧密码:新密码:确认新密码:确认取消在formMM中编写代码,修改后在frmlogin中输入修改后...
1.在formlogin1窗体中为原始密码
2.在formMM窗体中如下:
旧密码:
新密码:
确认新密码:
确认 取消
在formMM中编写代码,修改后在frmlogin中输入修改后的密码
注:VB编写,不不不不不需要连接数据库!!!!!!! 展开
2.在formMM窗体中如下:
旧密码:
新密码:
确认新密码:
确认 取消
在formMM中编写代码,修改后在frmlogin中输入修改后的密码
注:VB编写,不不不不不需要连接数据库!!!!!!! 展开
1个回答
展开全部
form1中
Public Names As String
Public Pass As String
Private Sub Command1_Click()
If Text1.Text = GetSetting("username", "save", "usernames") Then
If Text2.Text = GetSetting("username", "save", "password") Then
MsgBox "登陆成功"
Else
MsgBox "请输入正确的密码"
End If
Else
MsgBox "请输入正确的用户名"
End If
End Sub
Private Sub Command2_Click()
Names = Text1.Text
Pass = Text2.Text
SaveSetting "username", "save", "usernames", Names
SaveSetting "username", "save", "password", Pass
MsgBox "注册成功!"
End Sub
Private Sub Command3_Click()
Form2.Show
End Sub
Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
Command1.Caption = "登陆"
Command2.Caption = "注册"
Command3.Caption = "修改密码"
End Sub
form2中
Private Sub Command1_Click()
If Text1.Text = GetSetting("username", "save", "password") Then
If Text2.Text = Text3.Text Then
Names = Text2.Text
SaveSetting "username", "save", "password", Names
MsgBox "修改密码成功"
Me.Hide
Else
MsgBox "两次输入的密码不一致"
End If
Else
MsgBox "旧密码输入不正确"
End If
End Sub
Public Names As String
Public Pass As String
Private Sub Command1_Click()
If Text1.Text = GetSetting("username", "save", "usernames") Then
If Text2.Text = GetSetting("username", "save", "password") Then
MsgBox "登陆成功"
Else
MsgBox "请输入正确的密码"
End If
Else
MsgBox "请输入正确的用户名"
End If
End Sub
Private Sub Command2_Click()
Names = Text1.Text
Pass = Text2.Text
SaveSetting "username", "save", "usernames", Names
SaveSetting "username", "save", "password", Pass
MsgBox "注册成功!"
End Sub
Private Sub Command3_Click()
Form2.Show
End Sub
Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
Command1.Caption = "登陆"
Command2.Caption = "注册"
Command3.Caption = "修改密码"
End Sub
form2中
Private Sub Command1_Click()
If Text1.Text = GetSetting("username", "save", "password") Then
If Text2.Text = Text3.Text Then
Names = Text2.Text
SaveSetting "username", "save", "password", Names
MsgBox "修改密码成功"
Me.Hide
Else
MsgBox "两次输入的密码不一致"
End If
Else
MsgBox "旧密码输入不正确"
End If
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询