winxp +vb6 下想用timer 实现这样一个程序 在当前系统时间后三秒  执行另外一条程序

解决方案 »

  1.   

    Private Declare Function WinExec Lib "kernel32" (ByVal lpCmdLine As String, ByVal nCmdShow As Long) As LongPrivate Sub Form_Load()
        Timer1.Interval = 30000
        Timer1.Enabled = True
    End SubPrivate Sub Timer1_Timer()
        WinExec "自己的程序", 0
    End Sub
      

  2.   

    用API函数中的Sleep,
    sleep 3000
    ...
      

  3.   

    up
    Private Declare Function WinExec Lib "kernel32" (ByVal lpCmdLine As String, ByVal nCmdShow As Long) As LongPrivate Sub Form_Load()
        Timer1.Interval = 30000
        Timer1.Enabled = True
    End SubPrivate Sub Timer1_Timer()
        WinExec "自己的程序", 0
    End Sub