Intentad usar las etiquetas [ Delphi ] , [/ Delphi ] sin espacios cuando vayáis a escribir código en Delphi. Posteo los dos códigos con las etiquetas:
maxoncris:
Código Delphi
[-]
procedure TForm1.Edit1OnKeyPress(Sender: TObject; Key: char);
begin
if Key in ['a'..'z', 'A'..'Z'] then Key := #0;
end;
holgol:
Código Delphi
[-]if Key in ['0'..'9'] = False then Key := #0;
Un saludo