21297.html

来自「VB技巧问答10000例 VB技巧问答10000例」· HTML 代码 · 共 34 行

HTML
34
字号
<html>  <head>    <title>请问各位高手!有关于timer 的问题!(请内详)</title>  </head>  <body bgcolor="#FFFFFF" vlink="#808080">    <center>      <h1>请问各位高手!有关于timer 的问题!(请内详)</h1>    </center><hr size=7 width=75%><hr size=7 width=75%><p>Posted by 露脚 on November 12, 1999 at 23:06:06:<p>程式码如下所示:<br>Dim bp1 As Byte<br>Private Sub Command1_Click()<br>Debug.Print "===  command1 ====="<br>Debug.Print " ==== call  Show===="<br>Call Show1(1)<br>Call Show1(2)<br>End Sub<p>Private Sub Show1(ByVal bp As Byte)<br>bp1 = bp<br>Debug.Print " ====== into Show ======"<br>For i = 0 To 100<br>     For j = 0 To 100<br>     Next j<br>Next i<p>If bp = 1 Then<br>Debug.Print " ==== Set timer1 ======"<br>     Timer1.Enabled = True<br>     Timer1.Interval = 100<p>Debug.Print " ==== Set timer2 ======"<br>     Timer2.Enabled = True<br>     Timer2.Interval = 100<br>End If<br>     Debug.Print " ==== Quit Show ======"<p>End Sub<p>Private Sub Timer1_Timer()<p>If stopa = 2 Then Exit Sub<br>If bp1 = 1 Then<br>     Debug.Print " ====== into Timer1 bp1=1======"<br>     For i = 0 To 2<br>          For j = 0 To 2<br>          Next j<br>     Next i<br>     Debug.Print " ====== Quit Timer1 ======"<br>     stopa = stopa + 1<br>End If<br>End Sub<p>Private Sub Timer2_Timer()<br>Static stopa As Byte<br>If stopa = 2 Then Exit Sub<br>If bp1 = 2 Then<br>     Debug.Print " ====== into Timer1 bp1=2======"<br>     For i = 0 To 2<br>          For j = 0 To 2<br>          Next j<br>     Next i<br>     Debug.Print " ====== Quit Timer2 ======"<br>End If<br>stopa = stopa + 1<br>End Sub<br><br><br><hr size=7 width=75%><p><a name="followups">Follow Ups:</a><br><ul><!--insert: 21297--><!--top: 21298--><li><a href="21298.html">补充!如何让程式能够执行到第一个 call 呢!还是它是错误的!</a> <b>露脚</b> <i>23:08:51 11/12/99</i>(<!--responses: 21298-->2)<ul><!--insert: 21298--><!--top: 21307--><li><a href="21307.html">Re: 补充!如何让程式能够执行到第一个 call 呢!还是它是错误的!</a> <b>ellis</b> <i>08:56:07 11/13/99</i>(<!--responses: 21307-->1)<ul><!--insert: 21307--><!--top: 21330--><li><a href="21330.html">thanks!小弟已用do...loop 解决! thanks !(无内文)</a> <b>露脚</b> <i>07:10:00 11/14/99</i>(<!--responses: 21330-->0)<ul><!--insert: 21330--></ul><!--end: 21330--></ul><!--end: 21307--></ul><!--end: 21298--></ul><!--end: 21297--><br><hr size=7 width=75%><p></body></html>

⌨️ 快捷键说明

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