Re: I try to make... (new user on Delphi)
[ Related Articles and Replies ] [ DelphiLand Discussion Forum ]
Posted by webmaster Guido
on September 22, 2002 at 04:35:38:
In Reply to: Re: I try to make... (new user on Delphi) posted by stijn on September 19, 2002 at 23:14:57:
: : I try to make a small calculator.
: : Their are three editboxes, two editboxes where you put in a number and then you click a button, which makes a caculation edit1+edit2=edit3 and the awnser, edit3, shows up in the third editbox.
: : The lay out isn't a problem. My problem is the use of the StrToInt and the reverse fuction.
: I manged to come so far, but i only can't make the anwser to come in the edit3box.
: procedure TForm1.Button1Click(Sender: TObject);
: getal1: Integer;
: getal2: Integer;
: getal1 := StrToInt(Edit1.Text);
: getal2 := StrToInt(Edit2.Text);
: ShowMessage(IntToStr(getal1 + getal2));
Edit3.Text := ResultString;
In your example this would be:
Edit3.Text := IntToStr(getal1 + getal2);
Tip: have a look at DelphiLand's Tutorial, there's even a freely downloadable Dutch version :)
Related Articles and Replies:
[ DelphiLand Discussion Forum ]