ShareWare and Sample Code

(updated 15 June 2003)

Since I am no longer actively pursuing programming contracts, I have decided that the time has come for me to share my Visual Basic (and some PICK BASIC) code libraries with whomever might be interested in using them.  None of this source is officially supported by me to the general public, however a number of the modules are in active use at client sites.  That means that those modules (a) probably work very well, and (b) need to be fixed here too if you find a problem.

If you find a bug (or really love this stuff), LET ME KNOW - please.

Some of the code available here might be a bit dated, but it also includes some powerful routines that I use to great advantage at a number of client sites.  If you grew up in the Windows world and are writing Visual Basic strictly in a Windows environment, you will probably NOT be interested in most of what is here.  Most of these libraries are related to bring MultiValue Basic functionality to VB or in accessing data on a MultiValue host from VB.  I have tried to categorize the modules, so you can ignore what wouldn't interest you.

Coding Style

I tend to write very generalized code, since I assume reuse by default.  This can result in some over-engineering.  My error-handling is not always very thorough though, so caveat emptor.  My variable naming etc. does not follow any rigid standards, since I was coding long before the present standards existed, but I believe my code to be quite readable - you can be the judge of that.

Generic Visual Basic Modules

These code modules might be of interest to any Visual Basic programmer.  A number of them are dated, in that they gave me functionality that was not otherwise available at the time I wrote them.  Times change and there are better ways of doing a lot of this now, but there are some gems in here and the modules cost you nothing...

bulletCADUCEUS.BAS - My standard, always-present library routines
bulletGRIDEDIT.BAS - A code module for directly editing cell values in a standard MS Grid Control
bulletTEMPLATE.FRM and TEMPLATE.BAS - Modules to manipulate a MS Word document from VB, using OLE

MultiValue Visual Basic Modules

These code modules would only be of interest to MultiValue (PICK) Basic programmers, or programmers working with a MultiValue database environment.

bulletMVB Code Library for unlinked systems - Get Pick BASIC functionality into your VB projects
bulletMVBGRID.BAS - A code module for using a Grid control to edit multivalues (the MVB version of GridEdit.Bas)
bulletMVBLDUPD.BAS - A code module for fast item loads and updates to/from VB controls

MultiValue Connectivity VB Modules

These modules are directly concerned with getting information to and from a MultiValue database and the Windows environment.

bulletMVB Code Library for mvBASE systems - Pick BASIC functionality, including Read/Write/Call/Execute to mvBASE from VB6
bulletMVB Code Library front-end to WinLink - A code module for allowing MVB library calls to use WinLink
bulletTEMPLATE.FRM and TEMPLATE.BAS - Modules to manipulate a MS Word document from VB, using OLE

All of these code samples are written for Visual Basic 4.0-16 (and higher) and most (except where noted) require a version of the MVB Code Library.

bulletJETison - Convert JET or RUNOFF documents to MS Word or WordPerfect (available for a limited time on request)
bulletPickMore PowerPack (free to Caduceus Consulting clients only)

Return to Caduceus Consulting Home Page

CADUCEUS.BAS (updated 06 June 2003)

My standard, always-present code library

This VB code module contains the kind of things I wished were built-in to VB when I wrote them (and may now be).  I never write an application without including this file (compatible with VB4-16 and up).

<Click here to download a copy of this software.> (13 KB)

GRIDEDIT.BAS (updated 03 April 2002)

A code library for editing values directly in the MS Grid control

This VB code module contains about a dozen procedures that allow you to directly edit the contents of grid cells within the standard Microsoft Grid control (GRID.VBX). It does this by invisibly aligning editing controls over the appropriate grid cell, and keeping the values in sync.

<Click here to download a copy of this software.> (6 KB)

TEMPLATE.FRM and TEMPLATE.BAS (updated February 2002)

Form and code module versions of a library to manipulate an MS Word document as a template from VB

These mutually exclusive VB4 modules each contain seven externally callable procedures that allow you to edit an MS Word document as a template from VB, using OLE.

OLE (Object Linking and Embedding) programming can be tricky, given the difficulty of finding the right documentation and examples for the job. These modules make it easy for any VB programmer to add a powerful print utility to their data edit screens. Because the output comes from a template stored as a Word document, even less sophisticated users can edit the template and determine the content and layout of their output.

The TEMPLATE.FRM and TEMPLATE.BAS modules also include options to load template legends and data from the DICT and DATA sections of a remote MultiValue host (of course!). NOTE that both modules use the Caduceus Consulting MVB code library.

The shareware ZIP file contains the following files:

TEMPLATE.FRM (and .FRX) - VB4 source form that displays during OLE tasks
TEMPLATE.BAS - VB source code for invisible equivalent of TEMPLATE.FRM
MVB.BAS - Unlinked version of the Caduceus Consulting MVB code library

DEMOTMPF.EXE - Sample VB4 application using TEMPLATE.FRM
DEMOTMPF.VBP - Sample VB4 project using TEMPLATE.FRM
DEMOTMPF.FRM (and .FRX) - Sample VB4 form using TEMPLATE.FRM

DEMOTMPB.EXE - Sample VB4 application using TEMPLATE.BAS
DEMOTMPB.VBP - Sample VB4 project using TEMPLATE.BAS
DEMOTMPB.FRM (and .FRX) - Sample VB4 form using TEMPLATE.BAS

DEMOTMPL.DOC - Sample MS Word 2.0 document for both examples

<Click here to download a copy of this software.> (75 KB)

Back to Top

MVB_ONLY.BAS (updated 27 March 2003)

Pick BASIC functionality for VB projects (except for Data Access)

This VB code module contains over 50 procedures that give you MultiValue host BASIC functionality for your VB projects. Functions such as DCOUNT, FIELD, EXTRACT, INSERT, REPLACE, INDEX, and LOCATE are all provided as readable VB source. This version of the MVB Code Library was designed for unlinked systems that do not require data read/write capabilities to/from a MultiValue host. Other versions of the MVB Code Library support full functionality, including read, write, subroutine calling, and executes.

The shareware ZIP file contains one file:

MVB_ONLY.BAS - VB source code for unlinked MVB functions (compatible with VB4-16 and up)

<Click here to download a copy of this software.> (15 KB)

MVBGRID.BAS (updated 17 November 1998)

A code library for using a Grid control to edit multivalues

This software would ONLY be of interest to MuliValue (Pick) industry users. For generic VB programmers who want to edit values directly in the Microsoft Grid control, download the GRIDEDIT.BAS library.

This VB code module contains about a dozen procedures that allow you to use the standard Microsoft Grid control (GRID.VBX) to edit multivalued data in a variety of ways.

If you are familiar with the EDITGRID.BAS module from VMark, you should note the following differences:

bulletWith this module you can use text boxes, check boxes, or combo boxes to edit your data.
bulletThis module can handle the display of scrollable grid cells (horizontal & vertical).
bulletThis module is not limited to working with uniVerse objects or with a uniVerse host.
bulletThis module requires a version of the MVB code library (a free one is supplied with it).
bulletThis module can work with multiple grids on the same form.
bulletThis module can handle cell contents that exceed 255 characters.
bulletThis module has error handling and checks values against the limitations of the grid control.

The shareware ZIP file contains the following files (compatible with VB4-16 and up):

MVBGRID.BAS - VB source code for grid functions
MVB.BAS - VB source code for unlinked MVB Code library
DEMOGRID.EXE - Sample VB application using MVBGRID.BAS
DEMOGRID.VBP - Sample VB project using MVBGRID.BAS
DEMOGRID.FRM - Sample VB form using MVBGRID.BAS
DEMOGRID.FRX - FRX file for DEMOGRID.FRM

<Click here to download a copy of this software.> (48 KB)

Back to Top

MVBLDUPD.BAS (updated 25 March 2003)

Fast MultiValue item loading and updating to/from VB controls

Some time ago, I developed technique for fast implementations and prototyping of application screens.  Note that I don't necessarily recommend this in all situations, for two reasons: (1) it involves hard-coding of attribute numbers, which is rarely a good idea; and (2) it makes somewhat unorthodox use of a property in Visual Basic (DataField).

That being said, here's how it works:

  1. Read the entire item (using whatever middleware will do this for you).
  2. Call the supplied load routine to go through all controls on the form and load values as appropriate.
  3. Allow user to make changes, etc.
  4. Call the supplied save routine to go through all controls on the form and update values of the item.
  5. Write the item back to your MultiValue host.

To read more about the techniques and code used, check out the corresponding Ask the MV/VB expert article.  Meanwhile, I will share with you the standard load and update routines that I use to connect VB text, list, combo, check box, option button, and grid controls to MultiValue data.

The shareware ZIP file contains the following files (compatible with VB4-16 and up):

MVBLDUPD.BAS - VB source code for fast load and update routines
MVB_ONLY.BAS - VB source code of unlinked MVB Code Library

<Click here to download a copy of this software.> (20 KB)

MVB Library for mvBASE systems (updated January 2003)

VB 6 modules and mvBASE host source to create the MVB library, using the Client Link OCX (clink.ocx), giving you full access to MultiValue data and functionality from VB

The NT version of the MultiValue operating environment supplied by GA (now supported by Raining Data) is called mvBASE.  It comes with a file called the Client Link OCX (clink.ocx), which supposedly gives you connectivity from VB to the host data.  Good Luck.  It took me a long time to turn this into a usable library.  For some background on this software, you may wish to read the corresponding Ask the MV/VB expert article.

The Caduceus Consulting MVB code library.

The shareware ZIP file contains the following files:

MVBCLINK.FRM (and .FRX) - VB6 source form that displays during OLE tasks
MVB_VB.BAS - Unlinked version of the Caduceus Consulting MVB code library

CLINK.TXT - PICK/BASIC source for the mvbBASE program MVB.SERVER.CLINK
MVB_HOST.TXT - PICK/BASIC source for the mvbBASE INCLUDE item MVB.HOST
MVB_MAIN.TXT - PICK/BASIC source for the mvbBASE INCLUDE item MVB.MAIN
COMMON.TXT - PICK/BASIC source for the mvbBASE INCLUDE item MVB.COMMON
MVB_R83.TXT - PICK/BASIC source for the mvbBASE INCLUDE item MVB.R83

<Click here to download a copy of this software.> (37 KB)

Back to Top

JETison

A utility to convert JET or RUNOFF documents to Word or WordPerfect (available for a limited time on request)

JETison is an EXE that allows you to select JET or RUNOFF source documents on your remote host, and then converts them to RTF (Rich Text Format) on your PC. RTF is readable by all mainstream word processors, including MS Word and WordPerfect.

This utility attempts to duplicate the SOURCE FUNCTIONALITY of the document, rather than just mimic the output. The result is that rulers are maintained as closely as possible, and things like paragraph breaks occur only where the original document had them, not at the end of every printed line.

Back to Top

Copyright 1997-2003 Caduceus Consulting. All rights reserved.
Revised: June 15 2003.

Return to Caduceus Consulting Home Page

Copyright 2006 intellact
Last modified: Thursday May 25, 2006