procedure TForm1.edt1KeyPress(Sender: TObject; var Key: Char); begin if Key in ['0'..'9'] then key :=#0; end;