随时响应用户输入

功能说明:随时响应用户输入 
procedureTForm1.FormKeyPress(Sender: TObject;varKey: Char);
begin
if ActiveControl <> Memo1 then
  with Memo1.Lines do
  begin
    Text:=Text+Key;//取得用户得按键
  end;
end;




原文地址:https://www.cnblogs.com/xe2011/p/2518895.html