hb_setListenerRemove()

hb_setListenerRemove()

Syntax

      C Prototype

      #include "hbset.h"
      hb_setListenerRemove( int handle ) --> int

Arguments

<handle> : The handle for the SET listener callback function to be removed.

Returns

The handle if the callback function could not be located or the negative value of the handle if the callback function was removed.

Description

This function removes a SET listener callback function.

Examples

      int handle = hb_setListenerAdd( callback_function );
      ...
      hb_setListenerRemove( handle );

Compliance

NA

Files

Library is core

Platforms

All

Seealso

hb_setListenerAdd()

hb_setListenerNotify()

hb_setListenerNotify()

Syntax

      C Prototype

      #include "hbset.h"
      hb_setListenerNotify( HB_set_enum set,  HB_set_listener_enum
      when ) --> int

Arguments

<set> : The number of the SET parameter that is to be or was changed.

<when> : Set to HB_SET_LISTENER_BEFORE when called before the SET parameter is to be changed and set to HB_SET_LISTENER_AFTER when called after the SET parameter has been changed.

Returns

<int>

Description

This function notifies all SET listener callback functions. It must be called any time you change the value of a SET parameter directly instead of using the Harbour SET function. Both before and after the change.

Examples

      hb_setListenerNotify( HB_SET_DECIMALS,  HB_SET_LISTENER_BEFORE );
      hb_set.HB_SET_DECIMALS = 3;
      hb_setListenerNotify( HB_SET_DECIMALS,  HB_SET_LISTENER_AFTER );

Compliance

NA

Files

Library is core

Platforms

All

Seealso

hb_setListenerAdd()

hb_setListenerAdd()

hb_setListenerAdd()

Syntax

      C Prototype

      #include "hbset.h"
      hb_setListenerAdd( PHB_SET_LISTENER_CALLBACK callback ) --> int

Arguments

<callback> : A pointer to a function taking two enum parameters and returning no value. The first parameter identifies the SET parameter that is to be changed and the second parameter identifies whether the call is from before or after the value is changed. The callback function will be called twice whenever a SET parameter is changed using the Harbour SET function. The first call takes place before the SET value is changed and the second one is after the SET parameter has been changed.

Returns

An integer value representing the callback handle, in case the caller needs to deactivate the callback function.

Description

This function allows a subsystem that needs to track the status of some SET parameters to be notified whenever a SET parameter gets changed.

Examples

      void callback_function( HB_set_enum set,  HB_set_listener_enum when )
      {
         printf("\nCalled for SET parameter %d %s changing.", 
            set,  (when ? "after" : "before"));
      }
      int handle = hb_setListenerAdd( callback_function );

Compliance

NA

Files

Library is core

Platforms

All

Seealso

hb_setListenerRemove()

How I can make an .exe ?

Making .exe (executable) means building application. So you may find answer of this question here.

Anyway I will work to re-describe the process by a simpler way:

Almost every HMG sample have two .bat file: build.bat and ide.bat and using these files are quite simple:

Open command / console window, go to directory ( by CD command) of the sample you want to compile, and enter a simple command :

build demo <- will build demo.exe from demo.prg
or
ide demo <- open HMG-IDE with demo.prg

( IDE will wait your “run” command by pressing “run” button.)

So you may use this two .bat files for your projects too.

Copy build.bat and / or ide.bat to your working <dir>, and modify them this way:

build.bat :

call c:\hmg\build.bat <myProject> | <myProgram>

ide.bat :

c:\hmg\ide\ide.exe <myProject> | <myProgram>

Note : in this syntax “|” means “or”; you don’t need enter both project and program file names nor this sign; simply enter either one or other.

Change:

– “c:\hmg\” depending on your environment (installation); such as c:\hmg.3.1.1\ or antything else;

– <myProject> | <myProgram> to your project / program file name.

Project file is a text file with “.hbp” extension and contains a list of name(s) of your program file(s).

After building such .hbp file, you may open it from directly HMG-IDE ( by “open project command) and again, you may build your .exe by  pressing “run” button.

Clipper 5.x RG Summary

About This Summary

Functions

Commands

Classes

Statements

Operators

Tables

Terms

         Categories: 

Variable Handling

Data Manipulation

Flow Control

User Interface

General

Basics

Global Settings

Advanced

GET System

Menu System

TBrowse Classes

Environment

Database Commands and Statements

Database Functions

RDD Functions

Index Commands and Functions

File Management

Printing

Networking

Pre-processor Directives

Debugging and Error Handling

C5 Environment Commands and Functions

Commands :

SET BELL :

Toggle automatic sounding of the bell during full-screen operations

SET BELL on | OFF | <xlToggle>

SET COLOR :

Define screen colors

SET COLOR | COLOUR TO [ [<standard>]
    [, <enhanced>] [, <border>] [, <background> ]
    [, <unselected>]] | ( <cColorString> )

SET DEFAULT :

Set the default drive and directory

SET DEFAULT TO [ <xcPathspec> ]

SET FUNCTION :

Assign a character string to a function key

SET FUNCTION <nFunctionKey> TO <cString>

SET TYPEAHEAD :

Set the size of the keyboard buffer

SET TYPEAHEAD TO <nKeyboardSize>

Functions :

CURDIR() :

Return the current DOS directory

CURDIR( [ <cDrivespec> ] ) --> cDirectory

DISKSPACE() :

Return the space available on a specified disk

DISKSPACE( [ <nDrive> ] ) --> nBytes

FKLABEL()* :

Return function key name

FKLABEL( <nFunctionKey> ) --> cKeyLabel

FKMAX()* :

Return number of function keys as a constant

FKMAX() --> nFunctionKeys

GETENV() :

Retrieve the contents of a DOS environment variable

GETENV( <cEnvironmentVariable> ) --> cString

ISCOLOR() :

Determine if the current computer has color compatibility

ISCOLOR() | ISCOLOUR() --> lBoolean

MAXROW() :

Determine the maximum visible screen row

MAXROW() --> nRow

MAXCOL() :

Determine the maximum visible screen column

MAXCOL() --> nColumn

MEMORY() :

Determine the amount of available free pool memory

MEMORY( <nMemoryType> ) --> nKbytes

NOSNOW() :

Toggle snow position

NOSNOW( <lToggle> ) --> NIL

OS() :

Return the operating system name

OS() --> cOSName

SET() :

Inspect or change a global setting

SET( <nSpecifier>, [<expNewSetting>], [<lOpenMode> ] )
      --> CurrentSetting

TONE() :

Sound a speaker tone for a specified frequency and duration

TONE( <nFrequency>, <nDuration> ) --> NIL

VERSION() :

Returns Clipper Compiler version

VERSION() --> cVersion

Environment Variables

/*

GETENV() is an environment function that retrieve information
from the DOS environment into an application program.

Typically, this is configuration information, including path names,
that gives the location of files (database, index, label, or reports).

*/

PROCEDURE Main()
 ? " Computer Name:", GETENV( "COMPUTERNAME" )
 ? " Home Drive :", GETENV( "HOMEDRIVE" ) 
 ? " Home Path :", GETENV( "HOMEPATH" ) 
 ? " LogOn Server :", GETENV( "LOGONSERVER" ) 
 ? " Number of Processors :", GETENV( "NUMBER_OF_PROCESSORS" ) 
 ? " Processor Architecture :", GETENV( "PROCESSOR_ARCHITECTURE" ) 
 ? " Processor Identifier :", GETENV( "PROCESSOR_IDENTIFIER" )
 ? " Processor Level :", GETENV( "PROCESSOR_LEVEL" )
 ? " Processor Revision :", GETENV( "PROCESSOR_REVISION" )
 ? " OS :", GETENV( "OS" )
 ? " Session Name :", GETENV( "SESSIONNAME" ) 
 ? " User Domain :", GETENV( "USERDOMAIN" ) 
 ? " User Name :", GETENV( "USERNAME" )
 ? " User Profile :", GETENV( "USERPROFILE" )
 ? " Command Specification:", GETENV( "COMSPEC")
 ? " TEMP Folder :", GETENV( "TEMP" )
 ? " TMP Folder :", GETENV( "TMP" )
 ? " WINDOWS Folder :", GETENV( "WINDIR" )
 ? " Program Files Folder :", GETENV( "PROGRAMFILES" ) 
 ? " Prog. files extentions :", GETENV( "PATHEXT" )
 ? " Default Path :", GETENV( "PATH" )
 ?
RETURN // Main()

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: