private sub command1_click() dim txtpwd as string txtpwd = "000000" static a as integer if text1.text <> txtpwd then a = a + 1 text1.text = "" msgbox "密码输入错误" & a & "次,请重新输入.",0,"提示" if a = 3 then msgbox "密码错误次数过多",0,"提示" unload me end if else me.hide form1.show end ifend sub
private sub command1_click()
dim txtpwd as string
txtpwd = "000000"
static a as integer
if text1.text <> txtpwd then
a = a + 1
text1.text = ""
msgbox "密码输入错误" & a & "次,请重新输入.",0,"提示"
if a = 3 then
msgbox "密码错误次数过多",0,"提示"
unload me
end if
else
me.hide
form1.show
end ifend sub