1. Tech

Your suggestion is on its way!

An email with a link to:


was emailed to:

Thanks for sharing About.com with others!

Creating your first 'Hello World' Delphi Application
Page 1: Creating a simple project in Delphi.
 More of this Feature
• Page 2: Writing and compiling code
• Page 3: Saving your work, geting help
 Join the Discussion
"Post your views and comments to this chapter of the free Delphi Programming Course"
 Related Resources
• A Beginner's Guide to Delphi Programming.TOC

Welcome to the third chapter of the FREE online programming course:
A Beginner’s Guide to Delphi Programming.
An overview of application development with Delphi, including creating a simple project, writing code, compiling and running a project. Also, find out how to ask Delphi for help.

   Creating your first 'Hello World' Delphi Application
It's time to create a simple example in Delphi now. When you start Delphi, a default project is created with one form. This default project automatically creates a blank form, with its associated unit file and a project file, among others.
To get started, from the beginning, close anything that's open by choosing File | Close All from the main menu.

File | New... Before you create your first Delphi project, you need to know what you want to develop; a DLL, MDI application, SDI application a CLX application (for Linux) or something else. To start without all the bells and whistles we'll create a standard SDI Windows application. Simply point your mouse to File | New and select Application. This creates a new project group with a single application in it.

Project Manager Window

The new project contains an empty form, a unit (associated with its form), and a project file. As you develop and build your application, new files will be created and added to the project. The project files are listed in the Project Manager window, display it by selecting View | Project Manager from the main Delphi menu. With the Project Manager, you can easily visualize how all your project files are related. If you share files among different projects, using the Project Manager is recommended because you can quickly and easily see the location of each file in the project.

Application vs. CLX Application
With some versions of Delphi (supposed Delphi 6 Professional or Enterprise), you can build and develop cross platform applications that can be ported to Linux and compiled with Kylix. To develop a CLX application, instead of standard Windows application, you could pick CLX Application from the File | New menu. The Delphi IDE is similar to one when you build Windows applications, except that the Component palette changes dynamically to show the objects that are available for use in Linux CLX applications.

Since this course is about Delphi for the Windows platform, we will be exploring Delphi programming from that point of view. However, if you have Kylix and want to join this course you are of course encouraged to do so. Even though, my intention at this stage of this Course, is not to explain differences between CLX (Linux) and VCL (Windows) development you should know that there are no reasons why you should not join the course and just have in mind that when we talk about, let's say, form1.DFM you think form1.XFM.

Next page > Writing and compiling code > Page 1, 2, 3

A Beginner's Guide to Delphi Programming: Next Chapter >>
>> Chapter 4: Learn about: properties, events and Delphi Pascal

©2016 About.com. All rights reserved.