vb 口令输入错误超过3次就禁止输入 怎么搞 网上的答案都不行的 急急急啊

2025-03-07 09:11:57
推荐回答(1个)
回答1:

dim p as integer'全局变量
private sub command1_click()
if text1="123456" then
msgbox "通过"
else
p=p+1
text2=p
msgbox "密码错误 " & p & " 次"
if p>3 then
msgbox "密码错误超过 3 次!"
end
end if
end if
end sub