![]() |
#2
xzlxzlxzl2014-09-22 19:41
|
只有本站会员才能查看附件,请 登录
Option Explicit
Const MaxTimes As Integer = 3
Public intMyTimes As Integer
Private Sub Form_Load()
intMyTimes = 1
cboUserName.Addltem " 管理员 "
cboUserName.Addltem " 操作员1 "
cboUserName.Addltem " 操作员2 "
End Sub
Private Sub Command1_Click()
If cboUserName.Text <> " " Then
If txtPassword.Text = " " Then
MsgBox "请输入密码!"
'txtPassword.SetFocus
Else
If txtPassword.Text <> "11" Then
If intMyTimes > MaxTimes Then
MsgBox "您无权使用该软件!"
End
Else
intMyTimes = intMyTimes + 1
MsgBox "密码不正确,请重新输入!"
'txtPassword.SetFocus
End If
Else
MsgBox "登录成功!"
End If
End If
Else
MsgBox "操作员不能为空!"
Exit Sub
End If
End Sub
Private Sub Command2_Click()
End
End Sub
是什么错误呢 刚学习VB 求指教