9736.html
来自「VB技巧问答10000例 VB技巧问答10000例」· HTML 代码 · 共 23 行
HTML
23 行
<html>
<head>
<title>Re: 回圈问题或 . . . . .</title>
</head>
<body bgcolor="#FFFFFF" vlink="#808080">
<center>
<h1>Re: 回圈问题或 . . . . .</h1>
</center>
<hr size=7 width=75%>
<hr size=7 width=75%><p>
Posted by <a href="mailto:syshyan@ksts.seed.net.tw">VB新手</a> on February 01, 1999 at 13:23:43:<p>
In Reply to: <a href="9718.html">回圈问题或 . . . . .</a> posted by 初学者 on February 01, 1999 at 03:00:13:<p>
: 我是VB初学者,请问要如何在一个表单上设定输入密码及帐号,输入错误时<br>: 显示一个msgbox后,再回到该表单,错三次后就跳到Error Form,<br>: 正确的话就跳到Successful Form。<p>: 我想破头了都想不出来,可以帮帮我吗??谢谢!!!<p>Dim InputTimes, YPress As Integer<br>Dim PassWord$<p>Private Sub Form_Load()<br> PassWord$ = "123456"<br> Timer1.Interval = 1<br>End Sub<p>Private Sub Text1_Change()<br> Timer1.Interval = 1<br>End Sub<p>Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)<br> YPress = KeyCode<br>End Sub<p>Private Sub Timer1_Timer()<br> If YPress = 13 And Text1.Text <> "" Then<br> If Text1.Text = PassWord$ Then<br> Retr = MsgBox("密码输入正确!", 0, "提 示")<br> Timer1.Interval = 0<br> Else<br> InputTimes = InputTimes + 1<br> If InputTimes = 3 Then<br> Rete = MsgBox("你不是合法使用者!", 0, "警 告")<br> Else<br> Retw = MsgBox("密码输入错误!", 0, "警 告")<br> End If<br> End If<br> End If<br> If Retw = 1 Then<br> Timer1.Interval = 0<br> Text1.TabIndex = 0<br> Text1.Text = ""<br> End If<br> If Rete = 1 Then End<br>End Sub<br>....这是在章鱼工作室的source...<br>
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 9736-->
</ul><!--end: 9736-->
<br><hr size=7 width=75%><p>
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?