Getting Started

Download and install

To install and use MiniGUI, you will need:

  • MiniGUI source and binaries
  • Harbour or xHarbour compiler  ( Normally Harbour is build included ) 
  • Borland C++ compiler (version 5.8.2), or MinGW (since version 5.4), or Open Watcom (version 2.0), or Pelles C (version 9.0) compiler

MiniGUI uses Harbour and Borland C++ by default. To use MiniGUI with Harbour and Borland C++, go to the Download page and download the desidered version. Harbour binaries are included. Run the installation of both files.

The first installation file installs MiniGUI and Harbour, and the second installation file installs Borland C++. The default location for MiniGUI is C:\MiniGUI, and for Borland C++ it is C:\Borland\BCC58. The configuration directions below assume you have installed to these locations. Be sure to adjust your configuration to reflect your installation.

You may also use xHarbour instead of Harbour. While Harbour binaries are included in MiniGUI, xHarbour binaries are not. If you use xHarbour, you must download and install it separately. You must also build MiniGUI’s libraries with xHarbour, as explained below. The configuration directions below assume you install it to the default location of C:\xHarbour.


1. Edit or create C:\Borland\BCC58\Bin\bcc32.cfg and include the following lines:


If you are using xHarbour, use the following lines instead:


2. Edit (or create) C:\Borland\BCC58\Bin\ilink32.cfg and include the following line:


If you are using xHarbour, use the following line instead:


3. Set environmental variables in your SYSTEM VARIABLES OR USER VARIABLES.:

  • If you did not install Borland C++ to C:\Borland\BCC58, add the line SET MG_BCC=<location of Borland C++> to your AUTOEXEC.NT.
  • If you did not install MiniGUI to C:\MiniGUI, add the line SET MG_ROOT=<location of MiniGUI>.
  • Harbour is included in MiniGUI at %MG_ROOT%\Harbour, which defaults to C:\MiniGUI\Harbour. To use Harbour in some other location, add the line SET MG_HRB=<location of Harbour>.
  • MiniGUI libraries compiled for Harbour are included in MiniGUI at %MG_ROOT%\Lib, which defaults to C:\MiniGUI\Lib. To use MiniGUI libraries for Harbour in some other location, add the line SET MG_LIB=<location of MiniGUI libraries for Harbour>.

If you are using xHarbour:

  • The default location for xHarbour is C:\xHarbour. To use xHarbour in a different location, add the line SET MG_XHRB=<location of xHarbour>.
  • The default location for MiniGUI libraries compiled for xHarbour is %MG_ROOT%\xLib, which defaults to C:\MiniGUI\xLib. To use MiniGUI libraries for xHarbour in some other location, add the line SET MG_XLIB=<location of MiniGUI libraries for xHarbour>.
  • Build MiniGUI libraries: Go to the \SOURCE directory within MiniGUI and run MakeAllMiniguiLibs.bat.

I remember that these settings are not necessary, just install Minigui and run the compile.bat, or build.bat, contained in each examples folder.

To compile your project just call C:\Minigui\batch\compile.bat yourProject.prg from "yourProjectFolder".

Your First MiniGUI Program

At this point, you should be ready for your first MiniGUI program. We will start with a program, hello.prg, that displays a “Hello World” window.


    #include ""


      DEFINE WINDOW Win_1 ;
        AT 0,0 ;
        WIDTH 400 ;
        HEIGHT 200 ;
        TITLE 'Hello World!' ;




In the above code:

  • DEFINE WINDOW command creates the window.
  • Win_1 is the name of the window.
  • AT 0,0 indicates the window position (row 0, col 0).
  • WIDTH 400 means that the window will be 400 pixels wide.
  • HEIGHT 200 means that the window will be 200 pixels high.
  • TITLE 'Hello World!' indicates the text in the window title bar.
  • MAIN indicates that we are defining the main application window.
  • ACTIVATE WINDOW Form_1 shows the window and starts the event loop.

To compile and run this program, put it into hello.prg and use MiniGUI’s standard tool Compile.bat by typing

    c:\minigui\batch\compile.bat hello

Other development tools are described below.

Semi-OOP syntax

In the example above, to retrieve the window title, use the command:

    cVar := Win_1.Title

and to change the window title, use the following:

    Win_1.Title := 'New Title'

More samples

The above 'Hello World' program is in the MiniGUI samples at \SAMPLES\BASIC\HELLO_WORLD. The \SAMPLES directory contains hundreds of other working MiniGUI applications.

Currently you can find help in the Google group at

Development tools

MiniGUI includes the following development tools.

Compile.bat, located in \BATCH and briefly mentioned above, is a command line tool for building an executable from one or more source files. Type Compile.bat /? for help text.

MPM (MiniGUI Project Manager), located in \UTILS\MPM, is a GUI tool for building an executable from one or more source files. MPM stores the specs for each executable in a project file with an .mpm extension. Before using MPM, use the Compile.bat in the MPM directory to build the MPM executable. Within MPM, use Tools | Environment to associate .prg and .mpm files with MPM and set the locations of BCC, Harbour, and MiniGUI.

The MiniGUI IDE (integrated development environment), located in \IDE, is a GUI tool for visual form editing and application building. Within the IDE, use Tools | Preferences to set the locations of BCC, Harbour, and MiniGUI and make other settings.


For questions or suggestions about MiniGUI or Harbour, see Support.

This article was updated on 7 May 2024