Ver Mensaje Individual
  #7  
Antiguo 19-04-2012
Avatar de Caral
[Caral] Caral is offline
Miembro Premium
 
Registrado: ago 2006
Posts: 7.659
Reputación: 25
Caral Va por buen camino
Hola
No dices el error que sale pero es de imaginar que la propiedad de alguno de los edits esta vacía o contiene texto.
Coloca un cero en la propiedad text de cada edit y esto:

Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
var
a, b, suma : integer;
begin
if Edit1.Text = '' then
begin
ShowMessage('Porfavor Digite un Valor');
Edit1.SetFocus;
end
else
a := StrToInt(Edit1.Text);
b := StrToInt(Edit2.Text);
suma := a + b;
Edit3.Text := IntToStr(suma);
end;
Saludos
__________________
Siempre Novato
Responder Con Cita