procedure TForm1.Memo1KeyPress(Sender: TObject; var Key: Char); begin if Memo1.Lines.Count > 1 then Key := #0; end;