Function AllocConsole
var
s: string;
begin
AllocConsole;
try
Write('请输入 然后按 [ENTER]');
Readln(s);
ShowMessage('您输入了: ' + s);
finally
FreeConsole;
end;
end;
转载于:https://www.cnblogs.com/haiou327/archive/2010/11/23/1885769.html