Hola, lo que tienes que hacer es esto:
Código Delphi
[-]procedure TForm1.Button16Click(Sender: TObject);
var iva,total,a:real;
begin
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;
Saludos.