Delphi Programming Saint Louis MO

This article will explain to you how to get started with Delphi programming in a step-by-step tutorial. In this article, we will build a simple 'Hello world' application which changes a text label when button is clicked..

Local Companies

Open Software Technology
314-854-9138
7777 Bonhomme Ave
St. Louis, MO
Engineering Software International
314-352-4700
4545 Oleatha Ave
St. Louis, MO
New Horizons Software Inc
314-961-4335
801 Leonard DR
St. Louis, MO
E Data Solutions Inc
314-446-1555
315 Lemay Ferry RD
St. Louis, MO
Bemas Software Inc
314-439-5300
7 The Pines CT
St. Louis, MO
Digital Consulting & Software
314-682-2350
12655 Olive Blvd
St. Louis, MO
Foundry Software Development Co
314-993-3732
721 Emerson RD
St. Louis, MO
Wonderware Central
888-676-9933
Two City Place Drive
St. Louis, MO
STL EHR Group
314-477-7459
689 Craig Road
Creve Coeur, MO
Client Server Solutions Inc
314-523-4400
2008 Altom CT
St. Louis, MO

Provided by: 

This article will explain to you how to get started with Delphi programming in a step-by-step tutorial. In this article, we will build a simple 'Hello world' application which changes a text label when button is clicked. You will learn basic steps to design application user interface and how to define event handler that will trigger actions.

STEP 1:

When you create a VCL form application project, Delphi will create one empty form named Form1. This is your main application window. From the Object Inspector tool, you can find it on the bottom side of Delphi Integrated Development Environment (IDE). Click and select Caption properties of Form1 and change it to any text you want, for example, Hello Delphi programming.

Find Tool Palette on bottom right of Delphi IDE. Select TButton control and drag-drop it to Form1. Your form will be populated with a button. Select button control and drag it to arrange its position on the form. On Object Inspector, change Caption property to any text, for example Click Me.

From Tool Palette, drag TLabel and drop it on the form. From Object Inspector, change its Caption property to any text, for example Hello world. As you type, you can see that Label control will change its text.

STEP 2:

Select button control and from Object Inspector, activate Events tab. It is located after Properties tab.

Now look for OnClick event. Double click on it or you can double click on button control on the form. Delphi will generate code block for you which you can fill with your own code. Type your first code between Begin and End block and make it look exactly like the following code.

procedure TForm1.Button1Click(Sender:TObject);

begin

Label1.Caption:='Hello Delphi Programming';

end;

 

Save your project. Wait until the saving process is complete.

STEP 3:

Go to Project -> Build HelloWorld. Wait until the building process is complete. If you type it correctly, Delphi should generate no error messages. If you get any error messages, check for syntax error. Delphi displays line information where the error occurred, so it should be easy to spot it if you got any errors.

If you built with success, go to Run -> Run, or you can press F9. You project should come to life. Click button and the text should change to Hello Delphi Programming.

Click here to visit HowToDoThings.com

Featured Local Company

Open Software Technology

314-854-9138
7777 Bonhomme Ave
St. Louis, MO