...den Tastatur-/Mausbuffer leeren?

Autor: P. Below
Homepage: http://www.teamb.com

Kategorie: System

procedure EmptyKeyQueue;
var
  
Msg: TMsg;
begin
  while 
PeekMessage(Msg, 0, WM_KEYFIRST, WM_KEYLAST,
    PM_REMOVE or PM_NOYIELD) do;
end;

procedure EmptyMouseQueue;
var
  
Msg: TMsg;
begin
  while 
PeekMessage(Msg, 0, WM_MOUSEFIRST, WM_MOUSELAST,
    PM_REMOVE or PM_NOYIELD) do;
end;

 

printed from
www.swissdelphicenter.ch
developers knowledge base