You can use this code to ensure that the user only enters valid data.
procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
const
GoodKeys = [
VK_0..VK_9,
VK_NUMPAD0..VK_NUMPAD9,
VK_Left,VK_Right,
VK_BACK,VK_DELETE,
VK_END,VK_HOME,
VK_RETURN,VK_TAB
];
begin
if not(Key in GoodKeys) then Key:= 0;
end;