vb问题请教,从一个窗体转化到另一个不能实现!?谢谢~~

来源:百度知道 编辑:UC知道 时间:2024/05/26 00:43:53
Private Sub Form_Load()
Text1.Text = ""
Text1.MaxLength = 5
Text2.Text = ""
Text2.MaxLength = 4
Text2.PasswordChar = "*"
End Sub

Private Sub Text1_LostFocus()
If Not IsNumeric(Text1.Text) Then
MsgBox "用户名必须为数字", "", "警告"
Text1.Text = ""
Text1.SetFocus
End If
End Sub
Private Sub Command1_Click()
Dim m As Integer
If Text2.Text <> "abcd" Then
m = MsgBox("密码错误", 5 + 48, "警告")
If m <> 4 Then
End
Else
Text2.Text = ""
Text2.SetFocus
Form1.Hide
Form2.Show
End If
End If
End Sub
If Not IsNumeric(Text1.Text) Then "用户名必须为数字"改为"用户名必须为字母"或其他的怎么改呢?
Form1.Hide
Form2.Show
它按了commond 后form1不能转换到form2

Private Sub Text1_LostFocus()
If Not IsNumeric(Text1.Text) Then
MsgBox "用户名必须为数字", vbOKOnly, "警告"
Text1.Text = ""
Text1.SetFocus
End If
End Sub
Private Sub Command1_Click()
If Text2.Text <> "abcd" Then
MsgBox "密码错误", vbOKOnly, "警告"
Text2.Text = ""

Exit Sub
Else
Text2.Text = ""
Unload Me
Form2.Show
End If
End Sub

Private Sub Command2_Click()
If IsNumeric(Text1.Text) Then
MsgBox "用户名必须为字母", vbOKOnly, "警告"
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
End If
End Sub

没有问题呀
你那出什么问题了呢