Как очистить буфер клавиатуры?
Falk0ner, вс, 06/07/2008 - 15:34.
procedure EmptyKeyQueue;
var
msg: TMsg;
begin
while PeekMessage(msg, 0, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE or PM_NOYIELD) do
;
end;
begin
EmptyKeyQueue;
end.
var
msg: TMsg;
begin
while PeekMessage(msg, 0, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE or PM_NOYIELD) do
;
end;
begin
EmptyKeyQueue;
end.
Взято с Delphi Knowledge Base: http://www.baltsoft.com/
Отправить комментарий