请高手相助:如何用VF6.0编写只输入三次密码检查程序

来源:百度知道 编辑:UC知道 时间:2024/06/07 15:58:18

x=alltrim(thisform.text1.value)
y=alltrim(thisform.text2.value)
locate for alltrim(账号)==x and alltrim(密码)==y
if found()
=messagebox('欢迎进入本系统',0+64,'欢迎!')
ok=.t.
thisform.command2.click()
else
a=message('密码错误,是否重新输入?',5+16+0,'错误!')
if a=2
=message('放弃输入',0+64,'退出')
thisform.command2.click()
endif
n=n+1
if n>2
=message('密码错误,你无权进入!',0+84,'退出')
thisform.command2.click()
endif
rhisform.text1.selstart=0
thisform.text1.sellength=len(rhisform.text1.text)
thisform.text1.setfocus()
endif

其中有些东西你应该看的明白 比如有个放密码和账号的数据表 我没说 但是你应该看的出来和明白
看我打了这么多 还是给我追加点分吧!