Ver Mensaje Individual
  #1  
Antiguo 20-06-2014
Avatar de bulc
bulc bulc is offline
Miembro
 
Registrado: jun 2010
Posts: 416
Reputación: 17
bulc Va por buen camino
Chequeo para InputBox...

He ideado este código para chequear la entrada en un InputBox. ¿Alguien sabe cómo ampliar el tamaño de letra de un InputBox?
Código Delphi [-]
procedure TForm5.Button1Click(Sender: TObject); //Valid for numbers
Var
  sDato: String;
  cChar: Char; // Exige System.Character en la cláusula USES
  I: Integer;
begin
sDato:='';
sDato:=InputBox('Introduce el número base...', 'Número:', sDato);
if sDato='' then EXIT;
For I:=0 to Length(sDato) do
begin
   cChar:=sDato[i];
    if  IsLetter(cChar) then
    begin  ShowMessage('Introduce un número, no letras...'); exit;  end;
end;
I:=StrToInt(sDato);
ShowMessage('Dato:  ' +  IntToStr( I));
end;
Responder Con Cita