zhuxiaobing1989
 1 procedure delay(msecs: integer);
 2 var  
 3 Tick: DWord;
 4 Event: THandle;
 5 begin
 6 Event := CreateEvent(nil, False, False, nil); 
 7     try   
 8     Tick := GetTickCount + DWord(msecs);    
 9     while (msecs > 0) and (MsgWaitForMultipleObjects(1, Event, False, msecs, QS_ALLINPUT) <> WAIT_TIMEOUT) 
10     do    
11     begin   
12         Application.ProcessMessages; 
13         msecs := Tick - GetTickcount;   
14         end; 
15     finally    
16     CloseHandle(Event);
17     end;
18 end;
19  
20  

 

分类:

技术点:

相关文章:

  • 2021-12-19
  • 2021-12-29
  • 2021-04-07
  • 2021-10-26
  • 2021-12-19
  • 2021-08-24
  • 2021-04-11
猜你喜欢
  • 2021-12-19
  • 2021-10-26
  • 2021-12-19
  • 2021-12-19
  • 2021-12-19
  • 2021-11-17
  • 2021-12-19
相关资源
相似解决方案