Delphi中GUI程序调用控制台输入输出

核心提示:Add Console Input and Output for a GUI Delphi Application ..
转自-52delphi
 

procedure TForm3.Button1Click(Sender: TObject);

var
   s: string;
begin
  AllocConsole;
  try
    Write('请输入 然后按 [ENTER]');
    Readln(s);
    ShowMessage('您输入了: ' + s);
  finally
    FreeConsole;
  end;
end;
posted @ 2010-01-19 19:33  夸克  阅读(258)  评论(0编辑  收藏  举报