uses MMSystem;
procedure TForm1.Button1Click(Sender: TObject);
begin
if edit1.text ='' then
begin
sndPlaySound('C:\Windows\Media\windaVinciClose.wav',
SND_NODEFAULT Or SND_ASYNC Or SND_LOOP);
statictext1.Caption :=#0;
showmessage ('ingrese un valor valido');
end else
if edit2.text ='' then
begin
sndPlaySound('C:\Windows\Media\windaVinciClose.wav',
SND_NODEFAULT Or SND_ASYNC Or SND_LOOP);
statictext1.Caption :=#0;
showmessage ('ingrese un valor valido');
end else
statictext1.Caption :=floattostr ( strtofloat (edit1.text)+ strtofloat (edit2.text));
end;
end.