HMG-IDE In Short

HMG-IDE Harbour MiniGUI Integrated Development Environment is a comprehensive and highly sophisticated project management utility. It is also extremely facilitated to easily use.

It’s possible to build and manage an entire project from scratch under this utility; without needing cryptic batch command ( .bat ) file, without interesting endless compiler / linker switches, etc.

HMG-IDE is more than a project maker :

  •  A clever form editor
  •  A database files ( Tables ) manager
  •  A report builder / editor

HMG-IDE_InShort

HMG-IDE come as two flawor : ANSI and Unicode versions. Dont worry about it, this two version works almost exectly same; only difference is Unicode supoort. You may use either depending on either your need to Unicode or not.

HMG-IDE has four part :

Control Panel : This main window is constituted on a menu bar and a tool box, having many command buttons with descriptive tool tips.

Project Browser : You can view, select and inspect all project elements in this window. henever you add or exclude a project element (module (program source file), form, resource, report …), IDE automatically updates the project browser.

Object Inspector : This window is for view and change properties and events of GUI elements in your forms.

Form design board : A chalk board for designing forms and directing its graphical elements.

 

Working with IDE

Since HMG-IDE is an Integrated Development Environment, it’s possible building an entire project from scratch under HMG-IDE.

But this doesn’t mean “without coding”.

So, we can develop all GUI necessities of our project via HMG-IDE; but what, always we will need some little coding.

Then we can begin our project by building a project file. This is the very first and the easiest step:

Simply run IDE.exe and then select “New Project”.

When IDE ask, select (or build a new) a working folder and give a name (say Viva_HMG) to the project. .hbp extension will be assigned by IDE to project file.

Whenever IDE build a new project, automatically build and open a module file with name Main.prg and a form file with name Main.fmg.

Module file open by your text editor and form file open by IDE itself.

The content of your module file will be like this :

#include <hmg.ch>
Function Main
        Load Window Main
        Main.Center
        Main.Activate
Return

Basic rules :

– Every HMG project have one ( and only one ) “MAIN” procedure / function

– For using GUI controls, every HMG project have one ( and only one ) “MAIN” form.

So, names of both module and form files are “Main“.

File names doesn’t mandatory;

– only name of first procedure / function of first module file must be “Main” and

– “Window Type” property of one form must be “MAIN“.

You can see “module” tab of Project Browser window “(Main)” sign adjacent to the Main.prg and at the bottom line of “Properties” tab of Object Inspector “Window Type” property of “Main” form already set “MAIN” by IDE.

Now, we can work on our first form.

First we can give a name to it.

But what happening?

There isn’t “Name” in the properties list of our form !

Yes, this is correct; because:

– Basic rule 3: Every HMG form has their own name. Only exception is: a form to be LOAD, has a unchangeable name: TEMPLATE.

In other hand, you give an “alias” to a loaded form. The way of this is using “AS” close in the LOAD command. FE:

Load Window Main AS frmIDEBS_01

In this case you have change “Center” and “Activate” commands too :

frmIDEBS_01.Center
frmIDEBS_01.Activate

If you don’t use an “alias” in that way, you will use in all references of form by its file name; in this example : “Main”.

Now, its time to give a “Title” to the form.

For this, we will use “TITLE” property of form:

Double click “Title” and give a title in the open Input Box, say “It’s a Wonderful Life”

We can change easily background color of form:

Double click BackColor in the properties list.

Click “Custom“.

In the Color Select Form select your favorite background color or simply enter these tree values. : 64, 220, 210

Press RUN button and look to your application in work.

That’s all !  

Download source files

HMG IDE Basics

HMG-IDE

Harbour MiniGUI Integrated Development Environment is a comprehensive and highly sophisticated project management and form design tool. It is also extremely facilitated to easily use. HMG-IDE has four windows:

  1. Main Window (Control Panel),
  2. Project Browser,
  3. Object Inspector and
  4. Form Design Board.

You may use IDE for project management, for form design purpose or for both.

HMG-IDE Main Window ( Control Panel )

The main window is constituted on a menu bar and a tool box, having many command buttons with descriptive tool tips. This tool box may consider two sections:  project management tools and form design tools. Form design tools are divided into a “main controls” area and a “builders” area.

The project management tools allow you all project based works with interactive manner. This includes building and running projects without complex batch processing and environment configuration tasks. Project management tools buttons are:

Project Management Buttons

Project Browser

The Project Browser window’s tabs: Project Browser Tabs

  1. Modules,
  2. Forms,
  3. Resources,
  4. Reports,
  5. Configuration,
  6. Include and
  7. Tables

You can view, select and inspect all project elements in this window. Whenever you add or exclude a project element (module (program source file), form, resource, report …), IDE automatically updates the project browser.

Object Inspector 

The Object Inspector window is for view and change properties and events of GUI elements in your forms. Object Inspector

You can observe and modify properties and events value of graphical elements of your form in the Object Inspector window.

Form Window

The form window is a chalk board for designing forms and directing its graphical elements. New or existing, when you open a form, this windows also opened by IDE. With only two clicks you can easily place controls on your form: the first on desired button of control in form design tool box and the second one is anywhere in form you like. After placed, you can resize and change its place by dragging.

HMG IDE FormWindow

Controls :

In GUI programming jargon, GUI elements are called as control. HMG offers tons of controls and HMG-IDE successfully supports all of them.

At the beginning you have a form (window) and then you can easily replace any control onto this form. Simply click button of control to used, and then click any place on form to indicate placement (upper left corner) of control.

In short, you can build a complete form by only two clicks for each control. For example, suppose that we want putting an image control on our form; the button of image control is here:

First click this “image” button the toolbar of HMG-IDE, and then click anywhere in the form. This clicked point in the form, will be left upper corner of control; in this case : image.

This isn’t image itself, only a place-holder for image control.

When you placed a control in your form, IDE assign default values to its properties and events.

You can change the placement of control dragging by mouse with upper left corner ( point no: 1) of this place-holder and resize it with lower down corner ( point no: 2 ).

As first placed and whenever you select (click) any control in the form, this control come active in Object Inspector.   And as following on Object Inspector, every control has many properties and events. Since IDE assigned default values to all properties and events of that control, we don’t have learning meaning of all of them, at least at the beginning.

Whenever you change these values interactively on the form, IDE also updates them internally. You can observe and modify them in the Object Inspector window. HMG forms are designed “two way” manner. Saved in a readable format; in fact they are pure HMG source codes, neither binary nor cryptic. You can separately open,  inspect and also modify them. When opened by IDE, they are automatically converted to visual form.

Yes, you can edit .fmg file out of HMG, via any text editor when necessary. But please be careful, some points may be left out standards of IDE, though they have legal syntax.

IDE Toolbar :

IDE Toolbar ( indicated in above image by “Form Design Tools” ) has a button for each control. Every button has its own tool-tip; when mouse cursor keep over a button, tool-tip become visible and say name of this control.

Anyway here long name of all control is here:

Builders :

HMG-IDE has several builders for some relatively complex controls: You can use these features for placing  appropriate controls in your form: