问答网

当前位置: 首页 > 知识问答 > VB登录窗口制作代码和流程

VB登录窗口制作代码和流程

知识问答 浏览6次

'主窗口为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。