作一个秒表,有clear, stop, exit三个按钮。 stop按钮:按一下开始计时,再按一下停止计时,再按则继续开始计时,再按再停止... clear按钮:无论是正在计时还是处于停止计时的状态,都将秒表归零 exit按钮:推出程序 http://dl.zhishi.sina.com.cn/upload//18/42/63/1210184263.2012494267.jpg

解决方案 »

  1.   

    用timer和CTime就可以很简单的实现.......
      

  2.   

    开始的时候用GetTickCount() (StatrTime)记录下开始时间。然后SetTimer();
    在OnTimer中,GetTickCount,和开始时得到的时间相减(PassTime),得到经过的时间,更新Edit box;STOP时,KillTimer()Clear,StartTime = GetTickCount; //更新开始时间。
      

  3.   

    Dim sw As New System.Diagnostics.Stopwatch  '秒表
    sw.Start()      '---开始秒表计时---sw.Stop()    '---停止秒表---
      

  4.   


    timeSetEventThe timeSetEvent function starts a specified timer event. The multimedia timer runs in its own thread. After the event is activated, it calls the specified callback function or sets or pulses the specified event object.MMRESULT timeSetEvent(
      UINT uDelay,                
      UINT uResolution,           
      LPTIMECALLBACK lpTimeProc,  
      DWORD dwUser,               
      UINT fuEvent                
    );Return Values
    Returns an identifier for the timer event if successful or an error otherwise. This function returns NULL if it fails and the timer event was not created. (This identifier is also passed to the callback function.)
      

  5.   

    http://blog.chinaunix.net/u2/78338/showart_1309071.html
    LZ加油啊
      

  6.   

    这有一个可以用的,你可以简单修改下,达到使用要求了http://www.codeproject.com/KB/static/cclockst.aspx
      

  7.   


    到这个网址去下这个源码分析一下:
    http://www.vckbase.com/document/viewdoc/?id=1745