procedure OneMilliSecondProc(uTimerID: UINT; uMsg: UINT; dwUser: DWORD; dw1:<br> DWORD; dw2: DWORD);<br>begin<br> Form1.Label1.Caption := IntToStr(timeGetTime);<br>end;<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>var<br> wTimerRes_1ms, wAccuracy: UINT;<br><br>begin<br> wTimerRes_1ms := 10;<br> wAccuracy := 0;<br> timeSetEvent(wTimerRes_1ms, wAccuracy,<br> @OneMilliSecondProc, //回调函数[/red]<br> 1000, //用户自传送到回调函数的数据<br> TIME_PERIODIC);<br>end;