Microsoft KB Archive/82877

= How to Make a Custom Run-time Module from UI Toolbox =

Article ID: 82877

Article Last Modified on 8/16/2005

-

APPLIES TO


 * Microsoft BASIC Professional Development System 7.1
 * Microsoft BASIC Professional Development System 7.0

-



This article was previously published under Q82877



SUMMARY
It is beneficial to make a custom run-time module out of the Basic PDS User Interface (UI) Toolbox routines when using more than one program that uses these routines. This will save disk space and increase speed when chaining to other programs, because the run-time module will stay in memory across a CHAIN. This article describes the process of creating a custom run-time module out of the User Interface Toolbox routines.



MORE INFORMATION
First, note that you shouldn't put assembly routines that reference DGROUP in a custom run-time that will be used in a CHAINed program. UIASM.OBJ routines reference DGROUP. To work around this limitation, add the line &quot;DGROUP Assumes DS&quot; to the top of UIASM.ASM (provided with Basic PDS) and re-assemble it into a new UIASM.OBJ. (Another workaround is to use the value of SS in your assembler routine instead of DGROUP, because Basic always assumes that SS coincides with DGROUP.)

See also page 668 under &quot;DGROUP References&quot; in the &quot;Microsoft Basic 7.0: Programmer's Guide&quot; for Microsoft Basic PDS versions 7.0 and 7.1.

The Basic run-time module can be extended with the BUILDRTM.EXE utility. A Basic program must be compiled WITHOUT the /O (standalone) option to use the run-time or extended run-time module.

To create a custom run-time module, do the following:

  You must first create an &quot;export list&quot; containing all the subroutine and function names that will be used in the custom run-time module.

To create the export list, use a text editor to type the following into a file, and save it under the name EXPORT.LST (any name will suffice): # MenuItemToggle MenuInit MenuColor MenuSet MenuShow MenuPreProcess MenuEvent MenuInkey MenuDo MenuCheck MenuOn MenuOff ShortCutKeySet ShortCutKeyDelete ShortCutKeyEvent MenuSetState MouseHide MouseShow MousePoll MouseBorder MouseDriver MouseInit ButtonSetState WindowDo ButtonOpen WindowLine WindowPrint WindowOpen ButtonClose WindowClose WindowShadowSave WindowShadowRefresh WindowPrintTitle ButtonShow WindowSave WindowRefresh BackgroundSave BackgroundRefresh ListBox MaxScrollLength WindowCurrent WindowBorder WindowCols WindowRows Alert Dialog ButtonInquire WindowNext FindButton WindowScroll EditFieldInquire FindEditField EditFieldClose ButtonToggle EditFieldOpen WindowBox WindowCls WindowColor WindowInit WindowLocate WindowSetCurrent WhichWindow Interrupt GetCopyBox PutCopyBox AttrBox PutBackground GetBackground Box Scroll GetShiftState AltToASCII UITBEFR.LIB   After saving the EXPORT.LST file, run the following BUILDRTM command at the command prompt. Note that the only option needed is /Fs; the rest are defaults. UITBRUN is the name of the new custom run-time library. BUILDRTM /FPi /LR /Fs UITBRUN EXPORT.LST This command will create an object file named IMPORT.OBJ that must be linked with your final program.   You will now have the custom run-time library. The next and final step is linking your program together. The following will compile and link the UIDEMO (UIDEMO.BAS is included with PDS) sample program with your newly created custom run-time library. BC /X /FS UIDEMO.BAS; LINK IMPORT.OBJ+UIDEMO.OBJ,UIDEMO.EXE,,UITBRUN; (NOTE: The IMPORT.OBJ module must be first on the link line.)  To run the program, type UIDEMO at the command prompt.
 * 1) The names of all the routines used in the User Interface Toolbox,
 * 2) which can be found in MENU.BI, MOUSE.BI, GENERAL.BI, and WINDOW.BI.
 * 3) EXPORTS
 * 1) EXPORTS
 * 1) This is where you list the library that contains all the
 * 2) routines listed above
 * 3) LIBRARIES
 * 1) LIBRARIES
 * 1) LIBRARIES

Additional query words: BasicCom 7.00 7.10

Keywords: KB82877

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.