vb中if keyascii=0 then command1.value=1 是什么意思?
全过程是这样的:privatesubcommand1.click()staticnumasintegeriftext1.text<>"123456"thennum=num...
全过程是这样的:
private sub command1.click()
static num as integer
if text1.text<>"123456" then
num=num+1
if num=3 then
msgbox"口令无效,请与管理员联系!",16,"校对口令"
end
end if
msgbox"口令错误,请重新输入!",64,"校对口令"
text1.selstart=0
text1.sellength=len(text1.text)
text1.seltext=""
text1.setfocus
else
load mainfrm
mainfrm.show
unload fom1
end if
end sub
private subcommand2.click()
end
end sub
private sub text_keypress(keyascii as integer)
if keyascii=0 then
command1.value=1
end if
end sub
在这段程序中,大部分都能理解,但是就最后这一小段,觉得没起什么作用呢,删了它,依旧能够运行啊?请教高手? 展开
private sub command1.click()
static num as integer
if text1.text<>"123456" then
num=num+1
if num=3 then
msgbox"口令无效,请与管理员联系!",16,"校对口令"
end
end if
msgbox"口令错误,请重新输入!",64,"校对口令"
text1.selstart=0
text1.sellength=len(text1.text)
text1.seltext=""
text1.setfocus
else
load mainfrm
mainfrm.show
unload fom1
end if
end sub
private subcommand2.click()
end
end sub
private sub text_keypress(keyascii as integer)
if keyascii=0 then
command1.value=1
end if
end sub
在这段程序中,大部分都能理解,但是就最后这一小段,觉得没起什么作用呢,删了它,依旧能够运行啊?请教高手? 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询