我用vb做了一个登陆窗口,我想在这个登陆窗口上弄一个修改用户名密码的空间,改怎么输入代码?下面有原来的代码,
Private Sub Command1_Click()If Text1.Text = "用户" Then
Text2.SetFocus
ElseIf Text1.Text <> "用户" Then
MsgBox "请输入正确用户名!"
End If
If Text2.Text = "abcde" Then
Unload Me
万能工具.Show
ElseIf Text2.Text <> "abcde" Then
MsgBox "请输入正确密码!"
End If
End Sub
Private Sub Command2_Click()
Dialog2.Show
End Sub
Private Sub Text1_keydown(keycode As Integer, shift As Integer)
If Text1.Text = "用户" And KeycCode = vbKeyReturn Then
txt2.SetFocus
ElseIf Text1.Text <> "用户" And keycode = vbkeyruturn Then
MsgBox "请输入正确用户名!", vbOKOnly + vbInformation
End If
End Sub
Private Sub Text2_keydown(keycode As Integer, shift As Integer)
If Text2.Text = "abcde" And keycod = vbKeyReturn Then
Unload Me
万能工具.Show
ElseIf Text2.Text <> "abcde" And keycode = vbKeyReturn Then
MsgBox "请输入正确密码!", vbOKOnly + vbInformation
End If
End Sub
我希望在这个代码窗口新建一个修改用户名密码的控件,希望高手帮我详细解答,万分感谢!!!!!