As title
就像97年香港回归时候北京立的那种,有小时,分钟和秒?给个思路就成

解决方案 »

  1.   

    计时精度要求不高的话,将timer控件的interval设为1000,大约一秒触发一次,显示可以用text或label。在timer事件中修改显示值,label1.caption="2:00:00"
      

  2.   

    一个timer控件,一个textbox:
    Option Explicit
    Dim j As Date
    Private Sub Form_Load()
        j = #2:00:00 AM#
        Me.Timer1.Interval = 1000
        Text1.Text = CStr(j)
        Timer1.Enabled = True
    End SubPrivate Sub Timer1_Timer()
        j = DateAdd("s", -1, j)
        Text1.Text = CStr(j)
    End Sub
      

  3.   

    Dim st
    Private Sub Form_Load()
    Me.Text1.Text = "02:00:00"
    st = Time
    Me.Timer1.Enabled = True
    End Sub
    Private Sub Timer1_Timer()
    Me.Text1.Text = TimeValue("02:00:00") - (Time - st)
    End Sub
    注:如果采用Timer1每运行一次减1秒的办法,由于Timer1的运行问题,会使误差分积时累,到最后误差会很大,用每次与系统时间比较算出时差会好一点。
      

  4.   

    Dim PASSTIME As Long
    Private Sub Form_Load()
    Text1.Text = TimeSerial(5, 0, 0)
    Timer1.Interval = 1000
    Timer1.Enabled = True
    PASSTIME = 0
    End Sub
    Private Sub Timer1_Timer()
    PASSTIME = PASSTIME - 1
    Text1.Text = TimeSerial(5, 0, PASSTIME)
    End Sub
      

  5.   

    Private Sub Form_Load()
    Me.Timer1.Enabled = True
    End Sub
    Private Sub Timer1_Timer()
    Me.Text1.Text = "距2004年元旦还有" & Format((DateValue("04-1-1") - Now + 1), "d天hh时mm分ss秒")
    End Sub
      

  6.   

    Dim theday As DatePrivate Sub Form_Load()
    theday = #1/1/2004#
    Timer1.Interval = 1000
    Timer1.Enabled = True
    End Sub
    Private Sub Timer1_Timer()
    Text1.Text = "离元旦还有 " & Format(theday - Now, "d天h小时m分s秒")
    End Sub
      

  7.   

    Private sub StratTiming_click()
      dim xx as long
      dim TimingS as integer 'How many seconds  
      xx=timer+TimingS*1000
      while xx>timer
          'there write show timing program
          doevents
      wend
    end sub