vb界面设计
Private Sub Command1_Click() Static n If Text1 = "119" Then If Text2 = "911" Then Form2.Show Unload Me Else MsgBox "密码错误!" Text2 = "" Text2.SetFocusEnd If Else MsgBox "用户名错误!" Text1 = ""Text1.SetFocus End If n = n + 1 If n = 3 Then Unload Me '错误次数3次 End IfEnd Sub Private Sub Form_Load()Text1 = ""Text2 = ""End Sub
对你的程序,最简单的界面为(Form1)
而Form2可按你自己需求设置,如
想问什么问题???
这个代码非常好呀!!?
热门标签: