12098.html

来自「以电子书的形式收集了VB一些常见问题解决方法,可以很方便的查找自己需要解决的问题」· HTML 代码 · 共 35 行

HTML
35
字号
<html>
  <head>
    <title>Re: How to eliminate unlimited loop?</title>
  </head>
  <body bgcolor="#FFFFFF" vlink="#808080">
    <center>
      <h1>Re: How to eliminate unlimited loop?</h1>
    </center>
<hr size=7 width=75%>

<hr size=7 width=75%><p>
Posted by 阿毛 on April 16, 1999 at 23:33:11:<p>
In Reply to: <a href="12092.html">How to eliminate unlimited loop?</a> posted by 小飞虾 on April 16, 1999 at 20:49:45:<p>
: 连续两个text box, 皆有下列事件:<br>:    private sub text_LostFocus(index)<br>:       If Not IsCorrectDate(txtFields(index), False) Then<br>:         txtFields(index).setfocus<br>:       End If<br>:    end sub<br>: Public Function IsCorrectDate(strDate As String, AllowEmpty As Boolean) As Boolean<br>:   If AllowEmpty Then<br>:     If strDate = "" Then<br>:       IsCorrectDate = True<br>:     Else<br>:       IsCorrectDate = IsDate(strDate)<br>:     End If<br>:   Else<br>:     If strDate = "" Then<br>:       IsCorrectDate = False<br>:     Else<br>:       IsCorrectDate = IsDate(strDate)<br>:     End If<br>:   End If<br>: End Function<p>: 问题是在第一个text box按tab 跳过后curosr 就在这两textbox跳来跳去,无止尽。除了将两个连续text box 隔开外,有没有其他办法。<p>改一下试试!!<br> private sub text_LostFocus(index)<br>    select case index<br>           case 0<br>               .....(程式改在这里)<br>           case 1<br>               .....(程式改在这里)<br>    end select<br> end sub
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 12098-->
<!--top: 12137--><li><a href="12137.html">这是讨厌的问题</a> <b>cww</b> <i>21:57:33 4/18/99</i>
(<!--responses: 12137-->2)
<ul><!--insert: 12137-->
<!--top: 12168--><li><a href="12168.html">Re: 这是讨厌的问题:validate 好像也不可以</a> <b>小飞虾</b> <i>14:55:11 4/19/99</i>
(<!--responses: 12168-->1)
<ul><!--insert: 12168-->
<!--top: 12173--><li><a href="12173.html">应该像这样做</a> <b>cww</b> <i>16:04:33 4/19/99</i>
(<!--responses: 12173-->0)
<ul><!--insert: 12173-->
</ul><!--end: 12173-->
</ul><!--end: 12168-->
</ul><!--end: 12137-->
</ul><!--end: 12098-->
<br><hr size=7 width=75%><p>

</body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?