Skip to content

Lazarus! Get up, pick your pc up, and program!

First of all download Lazarus and FreePascal from here; this link is reachable from Lazarus main site too.

Note that more versions are available, not only past and present ones but for more operating systems too.

Choose one you need, get and install it.

We're ready.

Lazarus-First-Run
First Run

By launching Lazarus more windows open: toolbar, source editor (where to write the code), object inspector, messages (monitoring window), and a form (Form1) which looks like a classical application window.

This one is bound to the the code you see behind it, in a manner that first depends by last.

By looking at the code you see a particular line:

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs;
Lazarus-Source-Editor
Source Editor

This apparently simple line indeed is a way to recall code already written by others (people who made our tools).
"uses" is the recall command: by compiling it happens that "Classes, SysUtils, ecc..." are substituted with the relative code.

For now, note the central word: Forms. Later we'll quickly talk about it on compilation.

Lazarus-Toolbar
Lazarus - Toolbar

An empty window becomes boring very soon.
We want to add something; let's say a Button!
So click on toolbar, select Standard first tab, press on TButton (icon with Ok).

Lazarus-Form-and-Button
Form and Button

 

The button is ready to go on its natural place, the Form; so click on this, making a button appear into it.

 

By leaving mouse on button, a little rectangle shows you its basic features; this works for every of these visual "objects", Forms included (as already seen in the first picture).