本帖最后由 gm860419 于 2012-10-20 14:21 编辑
Dim $a, $b
Do
$a = InputBox ("登录窗口", "请输入用户名", "", "")
$b = InputBox ("密码", "输入您的密码.", "", "*")
If @error =1 Then Exit
If $a = "" Then
MsgBox(0 + 16 + 4096 + 262144, "错误信息", "输入的用户名不能为空")
ElseIf $a <> "admin" Then
MsgBox(0 + 16 + 4096 + 262144, '错误信息', '用户名不正确,请重新输入')
Else
If $b = "" Then
MsgBox(0 + 16 + 4096 + 262144, "错误信息", "输入的密码不能为空")
ElseIf $b <> "123" Then
MsgBox(0 + 16 + 4096 + 262144, '错误信息', '密码不正确,请重新输入')
Else
MsgBox(64, "恭喜", "成功")
EndIf
EndIf
Until $a = "admin" And $b = "123"
怎么点击取消,就窗口关闭,不显示密码窗口!
|