How to write the simplest Windows program?

Tech-Archive recommends: Fix windows errors by optimizing your registry



The program looks like this:
The Form has 3 TextBoxes and 1 Button. The user uses the keyboard to enter a number in each of the two first TexBoxes, presses the Button, and the sum of the numbers appears in the third TextBox.

In Borland Builder the OnClick event of the Button can look like this (if the TextBoxes are named N1, N2 and N3):

void __fastcall TForm1::Button1Click(TObject *Sender)
{
double A = N1->Text.ToDouble();
double B = N2->Text.ToDouble();

N3->Text=A+B;
}

Regards Knut
.


Quantcast