Delphi中GUI程序调用控制台输入输出
核心提示:Add Console Input and Output for a GUI Delphi Application ..
转自-52delphi
procedure TForm3.Button1Click(Sender: TObject);
vars: string;
begin
AllocConsole;
try
Write('请输入 然后按 [ENTER]');
Readln(s);
ShowMessage('您输入了: ' + s);
finally
FreeConsole;
end;
end;