Distance logo

Distance Developers Guide

How to build Visual Basic components

Jump down to:

Find out tool versions

Microsoft Visual Basic:


View Visual Basic project dependencies

To build a project requires all its pre-requisite projects to have been built. See:

To see project dependencies within Visual Basic:

To see project dependencies within a text editor:

  Reference=*\G{...}#2.0#0#..\..\..\..\WINDOWS\system32\stdole2.tlb#OLE Automation
  Reference=*\G{...}#2.0#0#..\..\Database Engine\D6DbEng.dll#Distance 6 Database Engine
  Reference=*\G{...}#1.0#0#..\..\Utilities\D6Util.dll#Distance 6 Utilities - Shared enumerations, properties and methods

  Object={...}#1.0#0; Vsflex7d.ocx
  Object={...}#2.0#0; Actbar2.ocx
  Object={...}#2.0#0; SPLITTER.OCX
  Object={...}#2.0#0; mo20.ocx
  Object={...}#1.2#0; comdlg32.ocx
  Object={...}#1.0#0; LLine3.ocx
  Object={...}#2.0#0; mscomct2.ocx
  Object={...}#1.0#0; CSDesc3.ocx
  Object={...}#1.0#0; D6Legend.ocx

  Module=CModHelp; ..\..\Utilities\Help\distance.b

Build single Visual Basic project

To build a project within the VB GUI:

To build a project from a command prompt:

chdir %BASE%\

start /wait "VB6" "C:\program files\microsoft visual studio\vb98\vb6.exe" /make "C:\Application Development\Distance60\PROJECT.vbp"

start /wait "VB6" "C:\program files\microsoft visual studio\vb98\vb6.exe" /make "C:\Application Development\Distance60\Map\Legend\D6Legend.vbp

Build all Visual Basic projects

chdir %BASE%

build_vb_projects.bat

Remove all Visual Basic binaries

To remove all ocx, dll and exe files for a complete rebuild:

chdir %BASE%

delete_vb_binaries.bat

Set DLL base address

The default DLL base address is &H11000000. This will cause lots of memory re-allocation. Components will load faster if a random number between this and &H80000000 is chosen. It is recommended that you choose:

To set the DLL base address:

DLL Base Addresses provides a list of addresses used to date. If you add a new component or change an address, remember to update this list.


View binary (dll, ocx, exe) meta-data


Update binary (dll, ocx, exe) meta-data

To update project name and description:

To update application name, used in Task Manager, and icon (for exe files):

To update version number:

To update ownership, copyright etc:


View binary (dll, ocx, exe) meta-data


View version compatibility

Visual Basic’s compatibility mode allows for checks to be done to ensure that libraries or components do not change their interfaces in a way that can break compatibility with older versions.

For Distance, original versions of dll and ocx files are stored within %BASE%\Compatibility folder stores all the original versions

To see the original version of a binary that is used by a project: