La respuesta que te doy parece funcionar (Windows 2000, Delphi7) pero honestamente no sé por qué: no trabajo con aplicaciones de consola. Hice una búsqueda en Google y encontré un código del que extraje esto:
Código:
program Project1;
{$APPTYPE CONSOLE}
uses
Windows, SysUtils;
var
hStdIn: THandle = 0;
procedure FlushInputBuffer;
var
I: DWord;
begin
I := 0;
repeat
if FlushConsoleInputBuffer(hStdIn) then
begin
Sleep(150);
GetNumberofConsoleInputEvents(hStdIn,I);
end
else
break;
until I = 0;
end;
function KeyPressed: Boolean;
var
I: DWord;
begin
GetNumberofConsoleInputEvents(hStdIn, I);
Result := I > 0;
end;
begin
hStdIn := GetStdHandle(STD_INPUT_HANDLE);
WriteLn('Hola ClubDelphi');
WriteLn;
Write('Oprime una tecla...');
FlushInputBuffer;
repeat
until KeyPressed;
end.
// Saludos