Ver Mensaje Individual
  #71  
Antiguo 16-06-2008
Avatar de enecumene
[enecumene] enecumene is offline
Miembro de Oro
 
Registrado: may 2006
Ubicación: Santo Domingo, Rep. Dom.
Posts: 3.040
Reputación: 24
enecumene Va por buen camino
Vamos a ver, prueba este, no te aseguro que funcione porque lo hice al vuelo:

Código Delphi [-]
procedure TForm1.Button16Click(Sender: TObject);
var iva,total,a:real;
    Numeros: Packed array[0..9] of integer;
    Valor: Integer;
begin
Valor := SrtToInt(Edit21.text);
 if Valor <> Numeros then
   Begin
     ShowMessagge('El Mensaje');
     Exit;
   end;
 if Edit21.Text > '9' then
   Begin
     ShowMessage('El Mensaje');
     Exit;
   end;
  try
  iva:=strtofloat(edit21.text);
  total:=strtofloat(edit23.text);
  iva:= (iva / 100)*total;
  a:= total + iva;
  edit23.text:=floattostr(a);
  button16.enabled:=false;
  except
  showmessage('Introduzca un valor válido. Carácteres permitidos 0-9.');
  Exit;
end;
end;

Intenta ahora.

Saludos.
__________________

Mi BLOG - ¡Joder, leanse la guia de estilo!
Las Palabras son enanas, los ejemplos gigantes.
Responder Con Cita