Expanding the Hello World application
Using Form1, from the Standard tab of the component palette, add three TEdit
components, three TLabel
components, and one TButton
. From the Additional tab, add one TSpeedButton. From the Dialogs tab, add one TCalendarDialog to Form1.
Click on Label1. In the Object Inspector window, locate the the property Caption. Click on the current value of Caption, which is Label1, and change it to First Name. Follow the same procedure:
Change the caption Label2 to Last Name.
Change caption Label3 to Date Of Birth.
Change the caption TSpeedButton to "..." (without the quotes).
Change the caption Button1 to Execute.
Change the caption Button2 Caption to Exit.
When completed, the form should look similar to the following screenshot:
Double-click on Button2, and add the following code snippet to the Button2Click procedure:
Application.Terminate;
In the implementation section, add a new method called GetUserName
:
function TForm1.GetUserName(); begin result Edit1.Text + ' ' +...