Ver Mensaje Individual
  #8  
Antiguo 23-09-2007
Avatar de tazzmk
tazzmk tazzmk is offline
Miembro
 
Registrado: sep 2007
Posts: 45
Reputación: 0
tazzmk Va por buen camino
hola, perdon me confundi con el lenguaje

aca va de nuevo pon este código en el evento OnKeyPress de tu TEdit y sólo admitirá números

Código Delphi [-]
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin 
  if ( StrScan('0123456789.-',Key) <> nil ) or 
     ( Key = Char(VK_BACK) ) then { BackSpace Key }
  begin 
    {Aqui tu tratamiento normal del evento}  
  end 
  else 
    Key := #0; 
end;
Responder Con Cita