.gbf File Format

When you define a new program in GUIBuilder, the information relating to the new program is stored in a GUIBuilder control file, with an extension of '.gbf'. This .gbf file works in concert with a BASIS resource file, which must be created first. BASIS resource files can be created in ResEdit (Visual PRO/5 v.1 .brf format), ResBuilder (Visual PRO/5 v.2 .brc format), or any text editor (Visual PRO/5 v.2 .arc format). ASCII Resource files (.arc format) must be converted to .brc format before they can be used by GUIBuilder. This conversion can be done within ResBuilder (File->Import->ASCII Resource), or you can use the stand-alone ResCompiler program (rescomp.exe).

This section identifies the .gbf file format and lists the variables in the [Program] section of the file.

File Sections

The GUIBuilder control file is an ASCII text file with a series of sections, each of which is identified by a token in square brackets [] starting at the left margin. The overall file format is:

File Section



variable name = value

Click here for a list of the section variables.


Program initialization code goes here.


Program end-of-job cleanup code goes here.


Optional remarks go here; they are ignored by GUIBuilder.

[Event …]

Event handler sections are formatted as follows:

[Event Win=window_idID=control_id



window-id identifies the form or child window within the resource file. A top-level form with an ID of 10 would appear as Win=10. A child window with an ID of 1001 within a form with an ID of 10 would appear as Win=10.1001. A child window of 2001 within window ID 10.1001 would appear as Win=10.1001.2001.

control_id is a number assigned to a particular control in the resource file. It's in the range of from 1 to 32767. Control ID 0 indicates the window itself; window events are identified with ID=0.

Event_code is a single case-sensitive letter or digit (e.g. 'B'=button pushed, 'X'=window closed) or a letter or digit followed by an integer qualifier (e.g. 'f0'=focus lost, 'f1'=focus gained). For Notify events, ':'+control-type is appended to the base event code. For example, "N2:19" (list button selection made), "N24:107" (grid row inserted). Each control type supports a different set of event codes.

Event_name is a short description of the event code. For example, Code=X would have an event name of <WIN_CLOSE>.

Subroutine_name is the internally-generated name of the event-handler subroutine within the generated program. The following example demonstrates the usual format of a subroutine name:

[Event Win=101.1002 ID=1001 Code=f0 <FOCUS_LOST>


If GUIBuilder generates an event-handler subroutine name that exceeds 32 characters, the user will be prompted for a new subroutine name.


[Program] Section Variables

The following illustrates the variables in the [Program] section of the .gbf file. Most of these values are set in the Program Options dialog.

Variable Name

Sample Value


Resource File


Name of the resource file used to create the .gbf file. The directory path is never given; the resource file must be in the current directory, or must be locatable using the Visual PRO/5 PREFIX.

Program Name


Base name of the program, with no extension specified. The program source is written to myprog.src; the extension for the tokenized program is in the gb.ini parameter, program_extension; it defaults to bbx.



Determines whether REMs (comments) are to be copied to the tokenized program. REMs will always appear in the .src version.

Creation Date


Date .gbf file created.

Creation Time


Time .gbf file created.


Copyright (C) 1998 BASIS International Ltd.

If set, this causes the specified copyright notice to be inserted near the beginning of the generated program.

Show Forms


Determines the initial visibility of forms in the generated program. The possible values are "All" (make all forms visible), "First" (make the first form visible, but initially hide any others), or "None" (start with all forms invisible; it is up to the developer to determine when they will be made visible).


c:/data/ d:/data/ c:/prog/

If set, this causes a PREFIX statement to be created near the beginning of the generated program.



If set, this causes a PRECISION statement to be created near the beginning of the generated program. Precision is in the range 0..16 places, or -1 for floating point.



If set, this causes a memory test to be inserted near the beginning of the generated program. If the program was not started with at least this many pages, it will be restarted with more memory. Note this parameter is ignored if the program is CALLed.