参数一:延时时间
参数二:某个变量
参数三:与参数二相同类型的变量要求:最长延时时间为参数一的值,但当参数二等于参数三时,提前中止延时

解决方案 »

  1.   

    用 do while timer 兼 doevents
    应该可以达到你的目的
      

  2.   

    对,根据下边:
    start=timer+5
    do while timer<start
      doevents
    loop
    自己看着写就行了
      

  3.   

    Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
    Private Sub Command1_Click()
    delay 3000, "a", "a"
    End Sub
    Sub delay(ByVal interval As Long, ByVal str1 As String, ByVal str2 As String)
    If str1 = str2 Then
    Exit Sub
    Else
    Sleep interval
    End If
    End Sub
      

  4.   

    chao778899(220330)的方法不错。
    start=timer+参数一
    do while timer<start
      doevents
    if 已收到 then exit do
    loop
      

  5.   

    对比后建议你使用   northwolves(野性的呼唤)  的