procdure TForm1.Edit1KeyPress(...); begin If Key >= #32 Then If Not (Key In ['0'..'9']) Then Key := #0; end