VB作业,新手,这里有两个窗体,怎么样在第一个窗体点击登陆跳转到第二个窗体?在线等,急! 50
2个回答
展开全部
form1,添加一个command,2个label,两个text
Private Sub Command1_Click()
If Text1 = "" Then
MsgBox "账号为空!", vbInformation, "Information"
Text1.SetFocus
Else
If Text1 <> "admin" Then '账号可自行修改
MsgBox "账号错误!", vbInformation, "Information"
Text1 = ""
Text1.SetFocus
Else
If Text2 = "" Then
MsgBox "密码为空!", vbInformation, "Information"
Text2.SetFocus
Else
If Text2 <> "admin" Then ''密码可自行修改
MsgBox "密码错误!", vbInformation, "Information"
Text2 = ""
Text2.SetFocus
Else
Unload Me
Form2.Show
End If
End If
End If
End If
End Sub
Private Sub Form_Load()
Label1.Caption = "账号"
Label2.Caption = "密码"
Text1 = ""
Text2 = ""
Text2.PasswordChar = "*"
Command1.Caption = "登录"
Me.Caption = "教学综合管理系统"
End Sub
form2直接菜单编辑器编辑菜单即可
Private Sub Form_Load()
Me.Caption = "个人空间"
End Sub
Private Sub tc_Click()
End
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询