posted by Daniel Campos Fernández on Thu 11th Nov 2004 20:44 UTC

"Gambas, Page 2/3"
Getting started
Let's program using Gambas. You can download and compile the sources from the download section of Gambas , or if you're using Mandrake, you can download the latest version from, or install it from the "contrib" section of Mandrake distribution. Debian Sid/Sarge/Linex users can do it just typing "deb sarge linex". There are packages for other distributions like Slackware, too. Just look the download page, in the "Binary packages" section.

Once you've installed it, run Gambas. The first screen shows a wizard that allows you to open some example programs, open recent projects and to create a new project.

Let's create a new project, so press the "New Project" option. Then press "next".

Select "Create a graphical project", then press "Next".

In the "project" name type "MyProgram", for example, and in the application title place any description, for example "This is my first program" or leave it blank, if you want.

In the next screen select a folder into your home directory where you want to save the project. The IDE will create a folder, with the same name as your project, into selected folder. Finally, a little resume of the options you've selected, and after pressing "Finish", you will have access to the RAD environment to start developing your project.

Go to "Forms" the press the right button and select "New Form". A dialog appears asking for the project properties.

Call it "FrmMain" the press OK.

Now in the "ToolBox" window, click on the button widget, go to your created form, and place it there resizing it as you want.

Now modify the button text, write "Hello" in the "Text" property of that button.

Let's code a little. Double-click your button. The code editor will appear. Just write the code for the button:

Message.Info ("Hello, World!")

Now, execute your program. To do that, press "F5" or the "run" button. To test the program click your button. A dialog appears with the welcome message. Easy, isn't it?

Table of contents
  1. "Gambas, Page 1/3"
  2. "Gambas, Page 2/3"
  3. "Gambas, Page 3/3"
e p (0)    48 Comment(s)

Technology White Papers

See More