What the differences …

Q: What the differences between this 3 services you’ve been provided: Harbour Compiler, Harbour HMG, HMG-IDE. We need to know exactly when and why use them?

Short Answer :

Harbour : Is a multi-platform open source compiler for xBase programming language, as a continuation of Clipper Programming Language. You can use Harbour with or without HMG; as pure console mode or with another GUI facility.

HMG / MiniGUI : is also an open source GUI Library developed by Roberto Lopez, for Harbour Compiler, designed exclusively Windows platform only. You can’t use HMG without Harbour.

HMG-IDE is a free utility developed by Roberto Lopez, builder of HMG. An Integrated Development Environment including a project builder and a form designer; plus a DB Manager. You can use HMG library with or without HMG-IDE.

As you easily see and cited here with this three products we have a comprehensive and complete Windows programming toolkit or Clipper for Windows ➡

Long Answer

HMG Unicode

Mr. Diamond of HMG community Rathinagiri wrote :

HMG 3.1.0 (Test) 2012/11/25
– Major update to HMG
– Unicode (UTF-8) compatibility. (Solely contributed by Dr. Claudio Soto)
– With this upgraded version HMG applications can be made available in all human languages.

This is a huge innovation, especially from non-latin alphabets users.

This sample is famous article of our Maestro in 12 language together

None LangSelect, none Set_CodePage etc ...

( Translator is Google; I’m innocent )

Dr. Claudio Soto said :

HMG-UNICODE is the best
Goodbye, goodbye, goodbye problems with Set_CodePage

WIH_4L

 

Download source files from here.

 

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

DBA : Data Base Assistant

DBA is an imitiative work to the © dBASE III’s Assistant.

It may be an easy tool for people who are familiar to this base architecture of the whole x-Base family.

Many thanks to :

Antonio Linares ( Initiator and first developer of © Harbour ) and

“Le Roy” Roberto Lopez ( Initiator, Builder and Developer of © HMG  ).

Without this two big men and their volonteer coworkers, DBA ( and many others of course) couldn’t be exist.

Download ( setup executable ) here.

Mini Agenda

This is a mini application developed primarily to denote some wonderful features of HMG.

Mini Agenda uses:

– A text (csv)  file for data source and Grid as browse of this file

– DEFINE ACTIVEX for “About” page from a .html file

– HFCL library ( Thanks to S. Rathinagiri for GridPrint )

Features :

– File operations: New, Open, ReOpen, Close, Save, Save as, Print

– Record operations:  Append, Delete, Insert

– Three way ( Natural, Ascending, Descending) sorting columns

– Preserve current item after sort

– In_place editing

– Incremental (and “soft” ) Search

– .ini File for keeping record of last used data file

Download : source, executable.