登录界面代码(VB登录窗口制作代码和流程)
应用介绍
'主窗口为form2, form1为登陆窗口,上面有2个text、1个command控件Private Sub Command1_Click() Static n If Text1 = "119" Then If Text2 = "911" Then Form2.Show Unload Me Else MsgBox "密码错误!" Text2 = "" Text2.SetFocus End If Else MsgBox "用户名错误!" Text1 = "" Text1.SetFocus End If n = n + 1 If n = 3 Then Unload Me '错误次数3次End Sub


