timer控件
由于timer的间隔只是一分多。
让它每隔一段时间取系统时间,用分钟数对10取摩。
然后判断是否发出命令。

解决方案 »

  1.   

    dim a,b as dateform_load()
    a=time
    end subtimer1.time()
    b=time
    if b-a=.... then'等于10分钟
      

  2.   

    没试,不知道行不行,挺危险的aa:
        EndWait = DateAdd("n", 10, Now)
        While Now < EndWait
            doevents
        Wend
        'to do something you want
    goto aa
      

  3.   

    取系统时间呀,记录第一次的时间time1
    取now和time1比较,差值如果是10分钟的整数倍,则做检测
      

  4.   

    Private Sub Timer1_Timer()
      static Count as integer
      Count=Count+1
      if Count=10 then
         你的操作
          .
          .
         Count=0
      end if
    End Sub
    将timer1的时间间隔设为1分钟(即60000)
      

  5.   

    sleep 如何实现,能否写细点
      

  6.   

    Private Declare Sub Sleep Lib "kernel32  " (ByVal dwmilliseconds As Long)...Sleep (1000)    '1000延时1秒,自己换算时间结分吧~~
      

  7.   

    坚决抵制 sleep强烈推荐以下函数:Public Sub Delay(mSec As Long)
        On Error GoTo ShowErr
        
        Dim TStart  As Single
        
        TStart = Timer
        
        While (Timer - TStart) < (mSec / 1000)
            DoEvents
        Wend
        Exit Sub
    ShowErr:
        MsgBox Err.Source & "------" & Err.Description
        Exit SubEnd Sub
    delay 600000  ''延时 10分钟