Getting Started with Form-based Applications in Delphi 7


The following topics will help you to use Delphi 7 to write simple form-based applications using buttons, edit boxes, labels and labelled edits. You will learn about the essential code and files that comprise an application and how to create an application from existing unit and form files. Our tutorial on form-based applications covers the access of variables, the calling of procedures, using a string grid, DBGrid, list box, combo box and several types of dialogue boxes, drawing on the canvas and displaying motion graphics based on a timer. (We demonstrate Lazarus for most examples in the tutorial but you should find them helpful for Delphi 7 because you use both IDEs in a very similar way).

In the instructions we will give the key combinations for actions where possible. This table shows ways of firing commonly used actions in the order they appear in the Delphi 7 menu structure.

Menu Action Button (showing tool-tip) Short-cut Key(s)
File > New > Application Create a new application New Items (Opens New Items dialogue) Alt+F then N then A
File > Open ... Open file Open file Alt+F then O
File > Save All Save all files   Shift+Ctrl+S
View > Object Inspector View Object Inspector   F11
View > Units ... Open View Unit dialogue View unit Ctrl+F12
View > Forms... Open View Form dialogue View form Shift+F12
View > Toggle Form/Unit Swap view of form/unit Toggle Form/Unit F12
Project > Add to Project ... Add file showing in editor to project Add file to project Shift+F11
Run > Run Run program

For the screenshots in the following topics we have dragged the dialogue boxes to convenient sizes, so do not expect yours to look exactly the same.

Click on the first topic title below, to continue:

Programming - a skill for life!

Getting Started, Links and other resources