home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / progbas / qb4tb520.arj / MIXED.DOC < prev    next >
Encoding:
Text File  |  1991-08-24  |  25.6 KB  |  642 lines

  1.  
  2.             MIXED-LANGUAGE TOOLBOX FOR QuickBASIC
  3.             ─────────────────────────────────────
  4.                       By Christy Gemmell
  5.  
  6.  
  7. These are native QuickBASIC functions and procedures which call the
  8. machine-code routines in the Assembly-Language Toolbox for QuickBASIC.
  9. To use them, you must link both TOOLBOX.LIB, from the Assembly-Language
  10. Library disk, and the copy of MIXED.LIB from the Mixed-Language Library
  11. disk to your stand-alone programs, like this:
  12.  
  13.     LINK yourprog,,,toolbox.lib mixed.lib;
  14.  
  15. Since the QuickBASIC environment only allows one Quick Library to be
  16. loaded at a time, however, the version of MIXED.QLB supplied also
  17. contains all the routines from TOOLBOX.LIB. This allows you to use the
  18. environment to develop and test programs which use functions from 
  19. both libraries. Just start QuickBASIC with the command:
  20.  
  21.     QB(X) yourprog /L mixed.qlb
  22.  
  23. You can even build your own Quick Libraries, incorporating Toolbox
  24. routines, using the QuickBASIC Linker as follows:
  25.  
  26.     LINK /QU yoursub.obj yourfun.obj toolbox.lib mixed.lib,,bqlb45.lib;
  27.  
  28. BQLB45.LIB is the special interface library supplied with Microsoft's
  29. QuickBASIC 4.5 compiler. Substitute the following library names for other
  30. versions of the language.
  31.  
  32.     BQLB40.LIB          for QuickBASIC 4.0
  33.     BQLB41.LIB          for BASIC 6.0
  34.     QBXQLB.LIB          for BASIC 7.0 and 7.1 PDS
  35.  
  36. Be sure that, whichever interface library you use, it can be found by
  37. LINK.EXE when the library is being built. This can be done, either by
  38. copying it to the Linker's own directory or to a subdirectory pointed to
  39. by a LIB= environment variable in your AUTOEXEC.BAT file, for example:
  40.  
  41.     SET LIB=C:\QB45\LIBRARY
  42.  
  43. See your MS-DOS or PC-DOS manual for more information about environment
  44. variables.
  45.  
  46. If you have the Professional version of the Assembly-Language Toolbox,
  47. of course, building customised libraries is much easier since a full
  48. set of object (.OBJ) modules, together with source code, is supplied
  49. with this release.
  50.  
  51. The stand-alone (.LIB) and Quick Library (.QLB) versions of the Mixed-
  52. Language Toolbox both contain the following SUB programs and FUNCTION
  53. procedures:
  54.  
  55.  
  56. BARMENU
  57.  
  58. Creates and operates a menu orientated horizontally on the screen row
  59. specified. The calling program must supply :
  60.  
  61. Row%        =   The screen row on which the menu bar will appear.
  62. Atr%        =   The display attribute or colour for the menu bar.
  63. Opt%        =   Number of options available for selection.
  64. Menu$()     =   String array containing selection list. Menu$(0) should
  65.                 be set to a string of ASCII characters, corresponding to
  66.                 the initial or key letter of each option in the list.
  67.                 Insert a space at the appropriate position of an option
  68.                 to be disabled. In the remaining option strings an
  69.                 ampersand '&' indicates that the next character is the
  70.                 Hotkey to be highlighted for that option.
  71. Bar%        =   The menu selection to be highlighted on entry into the
  72.                 procedure.
  73. Nxt%        =   If set, this flag just causes the menu to be refreshed
  74.                 without pausing for a selection from the user. This is
  75.                 used to handle presses on the Right or Left Arrow keys
  76.                 in the Pull-Down Menu procedure.
  77. Ctx%        =   If set, this flag indicates that context-sensitive help
  78.                 is available, in which case ...
  79. Tpc$        =   The root name of the Topic file to be displayed if the
  80.                 user presses <F1> for help. The current selection number
  81.                 is appended to this to produce the actual filename.
  82. Mouse%      =   If set, this flag indicates that a mouse is installed
  83.                 and can be used to make selections.
  84.  
  85. DECLARE SUB BarMenu (Row%, Atr%, Opt%, Menu$(), Bar%, Nxt%,_
  86.                      Ctx%, Topic$, Mouse%)
  87.  
  88. On completion the procedure returns with the following variable set:
  89.  
  90. Bar%        =   Number of selection made by user. If zero then the
  91.                 <Escape> key was pressed to abort the procedure
  92.                 without making a selection.
  93.  
  94. VERMENU (see below) is a similar procedure which operates a vertically
  95. orientated point-and-shoot type menu.
  96.  
  97. See the source code of DEMON.BAS, the Toolbox demonstration program, for
  98. examples of BARMENU and VERMENU in use.
  99.  
  100.  
  101. BINDEC
  102.  
  103. Translates a string of binary digits to their long integer decimal
  104. equivalent.
  105.  
  106. DECLARE FUNCTION BinDec& (Binary$)
  107.  
  108.  
  109. BITRESET
  110.  
  111. Clears the specified bit (0-15) of the integer number supplied.
  112.  
  113. DECLARE SUB BitReSet (Number%, Bit%)
  114.  
  115.  
  116. BITSET
  117.  
  118. Sets the specified bit (0-15) in the integer number supplied to 1.
  119.  
  120. DECLARE SUB BitSet (Number%, Bit%)
  121.  
  122.  
  123. BITTEST
  124.  
  125. Returns logical TRUE (-1) if the bit (0-15) of Number% is set and FALSE
  126. (zero) if the bit is clear.
  127.  
  128. DECLARE FUNCTION BitTest% (Number%, Bit%)
  129.  
  130.  
  131. CENTRE
  132.  
  133. Centres the string supplied within an empty string of specified width.
  134.  
  135. DECLARE FUNCTION Centre$ (Text$, MaxWidth%)
  136.  
  137. This function is called by the VERMENU routine (see below) to centre the
  138. title of a pull-down menu within the window it refers to.
  139.  
  140.  
  141. CHECKPRINTER
  142.  
  143. This procedure checks if the specified parallel printer is ready and
  144. on-line. If so, it returns immediately with Ready% set to -1 (TRUE), if
  145. not, CHECKPRINTER displays the message 'PRINTER NOT READY' on the bottom
  146. row of the screen and waits for the operator to correct the problem and
  147. press a key.
  148.  
  149. If the user presses <Escape>, the procedure returns with Ready% set to
  150. zero (FALSE). Any other keystroke causes it to go back and test the
  151. printer again. CHECKPRINTER will not return until either the printer is
  152. ready for output, or the <Escape> key is pressed.
  153.  
  154. DECLARE SUB CheckPrinter (Printer%, Ready%)
  155.  
  156. Printer% is the number of the parallel printer to test (1 = LPT1: etc).
  157.  
  158. Example:    CheckPrinter 1, Ready%              ' Test LPT1:
  159.             IF NOT Ready% THEN
  160.                STOP
  161.             ELSE
  162.                LPRINT Stuff$
  163.             END IF 
  164.  
  165.  
  166. DATEINPUT
  167.  
  168. Accepts and verifies date input in a Reverse Video entry panel, all the
  169. usual editing keys are supported and entry is terminated by either a
  170. Carriage Return or one of several special function keys (see below).
  171.  
  172. DECLARE FUNCTION DateInput$ (Default$, Context%, Topic$, HotKey%)
  173.  
  174. Default$    =  default string which can be accepted by just pressing
  175.                the <Enter> key.
  176. Context%    =  set TRUE if context-sensitive help is available, in
  177.                which case ... 
  178. Topic$      =  name of the HELP Topic file to display whenever the
  179.                <F1> key is pressed. 
  180. HotKey%     =  If entry is terminated by anything other than the
  181.                <Enter> key, this variable will contain an explanatory
  182.                return code ..
  183.  
  184. Return Codes:   1  =  <Escape> abort entry returning a null string
  185.                 2  =  <F2>     repeat previous entry for this field
  186.                 3  =  <Up Arr> pressed, move to previous field 
  187.                 4  =  <Dn Arr> pressed, move to next field
  188.                 5  =  <Pg Up>  pressed, move to top of screen
  189.                 6  =  <Pg Dn>  pressed, move to end of screen
  190.  
  191. Editing Keys:   <L.Arrow>   =  Move cursor one character to the left
  192.                 <R.Arrow>   =  Move cursor one character to the right
  193.                 <Home>      =  Move cursor to first character of field
  194.                 <End>       =  Move cursor to last character of field
  195.                 <Ctrl End>  =  Clear from current cursor position to
  196.                                the end of the entry field.
  197.                 <BackSpace> =  Replace character under cursor with a
  198.                                blank space and move cursor one character
  199.                                to the left.
  200.                 <F1>        =  pop up on-line HELP screen.
  201.  
  202. DATEINPUT is designed to be used as part of a full-screen data-entry
  203. system. Your program can examine the return code to determine whether
  204. the operator wishes to terminate entry or move forwards or backwards
  205. between entry fields.
  206.  
  207. See also the REVINPUT function for a similar, more general-purpose,
  208. data-entry routine.
  209.  
  210.  
  211. DAYSBETWEEN
  212.  
  213. Calculates the number of days between two dates, supplied as strings in
  214. the format DD/MM/YYYY. The function will provide accurate results when
  215. supplied with dates between 01/01/1901 and 31/12/2099.
  216.  
  217. DECLARE FUNCTION DaysBetween& (Date1$, Date2$)
  218.  
  219. See the INTERVAL function for a method of calculating the number of
  220. days between two Julian dates.
  221.  
  222.  
  223. DECBIN
  224.  
  225. Translates a decimal number to an equivalent string of binary digits.
  226.  
  227. DECLARE FUNCTION DecBin$ (Decimal&)
  228.  
  229.  
  230. DOSVERSION
  231.  
  232. Gets the current Operating System (DOS) version. The version is returned
  233. as a string in the form "3.20" (for DOS 3.2).
  234.  
  235. No calling parameters are required.
  236.  
  237. DECLARE FUNCTION DosVersion$ ()
  238.  
  239.  
  240. FINDFILE
  241.  
  242. This function can be used to locate a particular file in any drive or
  243. directory of the current system. Supply it with a pathname or an ambiguous
  244. filespec and it will display a list of all matching files from which the
  245. user can select the one required by highlighting it with the cursor arrow
  246. keys. The function returns the full pathname of the file selected or a
  247. null string if <ESC> was pressed.
  248.  
  249. DECLARE FUNCTION FindFile$ (FileSpec$, Attr%, Mouse%)
  250.  
  251. FileSpec$   =  Pathname of file to be located. It can include a drive
  252.                letter and the filename may be ambiguous if you use the
  253.                wildcard characters '*' or '?'.
  254.  
  255. Attr%       =  The display attribute for the file selection box if more
  256.                than one match is expected. If Attr% = 0 the function
  257.                uses default colours - Black on Cyan for colour monitors
  258.                and inverse video for monochrome monitors.
  259.  
  260. Mouse%      =  set this to TRUE (non-zero) if mouse support is required.
  261.  
  262. On entry, FILESPEC$ should contain the name of the file to be located. If
  263. the filespec is ambiguous, the program presents a directory listing, in a
  264. popup window, of all files which match and allows the operator to select
  265. the actual one required. If the pathname is explicit, FindFile just checks
  266. if it actually exists. On return FILESPEC$, will contain the full pathname
  267. of the selected file, or a null string if it was not located (or the
  268. <Escape> key was pressed).
  269.  
  270.  
  271. GETFLAG
  272.  
  273. The MIXED-LANGUAGE Toolbox includes a pair of functions which give you
  274. access to the INTRA-APPLICATION COMMUNICATION AREA (IAC), an area of
  275. memory which has been reserved, by DOS, so that programs can communicate
  276. with each other. The IAC is 16 bytes long and is located, in low RAM at
  277. addresses 0000:04F0 - 04FF (Hex). Once set, an IAC flag retains it's value
  278. until you reset it or the computer is rebooted.
  279.  
  280. This function returns the value of one of the IAC flag bytes (1 to 16).
  281.  
  282. DECLARE FUNCTION GetFlag% (Flag%)
  283.  
  284. You can set the current setting of a particular IAC flag byte with the
  285. SETFLAG function.
  286.  
  287. Since QuickBASIC programs, compiled with the /O switch to run stand-alone,
  288. cannot pass variables to chain modules, you can use this feature to
  289. implement a limited form of parameter passing.
  290.  
  291.  
  292. GRATTRIB
  293.  
  294. Calculate display attribute for graphics modes, given the foreground
  295. and background colours required.
  296.  
  297. DECLARE FUNCTION GrAttrib% (ForeGround%, BackGround%)
  298.  
  299. GRATTRIB calculates the attribute value which controls the foreground and
  300. background colours of characters displayed using the GRAPRINT, CGATEXT,
  301. MCGATEXT and VGATEXT procedures. It translates them using the formula:
  302.  
  303.     Attribute% = (BackGround% * 256) + ForeGround%
  304.  
  305. Make sure that you use foreground and background colour values appropriate
  306. to the SCREEN mode currently in use.
  307.  
  308. The ATTRIBUTE function provides a similar service for use with text mode
  309. screens
  310.  
  311.  
  312. ISDIR
  313.  
  314. This routine tests to see if the supplied string is the name of a
  315. directory. To do this a local error handler is established to trap any
  316. run-time errors and an attempt is made to change to the directory
  317. specified in TEST$. If an error occurs then ISDIR% is set to Boolean FALSE
  318. (zero), otherwise TRUE (-1) is returned.
  319.  
  320. DECLARE FUNCTION IsDir% (Test$)
  321.  
  322. ISDIR is used by the FINDFILE function when searching for files on another
  323. drive or directory.
  324.  
  325.  
  326. LEGALNAME
  327.  
  328. This function returns TRUE or FALSE to indicate if the filespec passed to
  329. it is legal. To do this, each character in the string is compared with a
  330. set of illegal characters. If none are found a further check is made to
  331. ensure there are no more than eight characters in the name and three in
  332. the extension.
  333.  
  334. FUNCTION LegalName% (FileSpec$)
  335.  
  336.  
  337. LINEUP
  338.  
  339. Returns a string representation of a numeric value. If COMMA% is TRUE
  340. (non-zero) then the string has commas inserted between every group of
  341. three digits to the left of the decimal. If LENGTH% is non-zero then the
  342. resulting string is left padded with spaces to produce a string of the
  343. required length. If CURRENCY$ is not null, the character it contains will
  344. be prefixed to the returned string.
  345.  
  346. DECLARE FUNCTION LineUp$ (Num#, Places%, Comma%, Length%, Currency$)
  347.  
  348.  
  349. LONGDATE
  350.  
  351. This function accepts a three-part numeric date and transcribes it into
  352. a string containing the date in words. This includes the day of the week,
  353. which is obtained by calling DOS's internal time and date services. DOS
  354. is also used to check for an invalid date.
  355.  
  356. DECLARE FUNCTION LongDate$(Day%, Month%, Year%)
  357.  
  358. LONGDATE returns a null string if the arguments passed evaluate to an
  359. illegal date (eg 29/2/1989).
  360.  
  361.  
  362. MATCH
  363.  
  364. This function is similar to INSTR but allows the use of wildcards. It is
  365. based on the MATCH function provided by Digital Research's C-BASIC.
  366.  
  367. DECLARE FUNCTION Match% (Start%, Search$, Pattern$)
  368.  
  369. Call with:  Start%   = character position in search string to
  370.                        start searching from
  371.             Search$  = String to search
  372.             Pattern$ = String expression to search for 
  373.  
  374. Returns:    Position of first character of Pattern$ in Search$
  375.             (0 if Pattern$ is not found)
  376.  
  377. Wildcards:  #   match any numeric character
  378.             !   match any alphabetic character
  379.             ?   match any character
  380.  
  381.             \   indicates that the next character in the string
  382.                 to search for is literal, not a wildcard.
  383.  
  384.  
  385. PANEL
  386.  
  387. This procedure is used to produce rectangular boxes, upon the video
  388. display, of various shapes and colours. The calling program should supply
  389. the row/column co-ordinate of the top, left-hand corner of the required
  390. panel, its height in rows and width in columns. You should also specify
  391. the display attribute that the panel will be displayed in and the border
  392. style to frame it with.
  393.  
  394. DECLARE SUB Panel (Row%, Col%, Rows%, Cols%, Border%, Attr%)
  395.  
  396. Panels can be drawn with the following border styles:
  397.  
  398. ┌───┐         ╔═══╗         ╓───╖        ╒═══╕
  399. │ 1 │         ║ 2 ║         ║ 3 ║        │ 4 │
  400. └───┘         ╚═══╝         ╙───╜        ╘═══╛
  401.  
  402. Any other value draws the panel without a border.
  403.  
  404. Although the boxes drawn by PANEL resemble popup windows, you cannot
  405. restore the screen contents overwritten by a box once it has been drawn.
  406. See the POPUP and SHUTUP routines, however, for a full windowing
  407. system which does preserve the display.
  408.  
  409.  
  410. REVINPUT
  411.  
  412. Accepts user input in a Reverse Video entry panel, all the usual editing
  413. keys are supported and entry may be terminated by either a carriage-return
  414. or one of several special function keys (see below).
  415.  
  416. DECLARE FUNCTION RevInput$ (Max%, Default$, Legal$, Ctx%, Topic$,_
  417.                             Mask%, HotKey%)
  418.  
  419. Max%         =  maximum number of characters which can be accepted.
  420. Default$     =  default string which can be accepted by just pressing
  421.                 the <Enter> key.
  422. Ctx%         =  set TRUE if context-sensitive help is available, in
  423.                 which case ... 
  424. Legal$       =  a string of legal characters which are acceptable for
  425.                 input. If a null string is passed then all printable
  426.                 characters will be accepted. 
  427. Topic$       =  name of the HELP Topic file to display whenever the
  428.                 <F1> key is pressed. 
  429. Mask%        =  if TRUE (non-zero) prevents the characters entered from
  430.                 being echoed to the display. Instead an asterisk (*) is
  431.                 displayed for each character position although the entry
  432.                 string itself is unaffected. Use this for passwords.
  433. HotKey%      =  If entry is terminated by anything other than the
  434.                 <Enter> key, this variable will contain an explanatory
  435.                 return code ..
  436.  
  437. Return Codes:   1  =  <Escape> abort entry returning a null string
  438.                 2  =  <F2>     repeat previous entry for this field
  439.                 3  =  <Up Arr> pressed, move to previous field 
  440.                 4  =  <Dn Arr> pressed, move to next field
  441.                 5  =  <Pg Up>  pressed, move to top of screen
  442.                 6  =  <Pg Dn>  pressed, move to end of screen
  443.                 7  =  A hotkey was supplied and used. The calling
  444.                                program takes appropriate action.
  445.  
  446.                 You can specify any key as the hotkey by setting your
  447.                 own value in HotKey% before calling REVINPUT. This
  448.                 number can either be the ASCII code of any standard
  449.                 key or the SCAN code (as a negative value) of one of
  450.                 the function keys. Set HotKey% to zero to turn off
  451.                 keyboard trapping (except for keys 1-6 above).            
  452.  
  453. Editing Keys:   <L.Arrow>   =  Move cursor one character to the left
  454.                 <R.Arrow>   =  Move cursor one character to the right
  455.                 <Home>      =  Move cursor to first character of field
  456.                 <End>       =  Move cursor to last character of field
  457.                 <Ctrl End>  =  Clear from current cursor position to
  458.                                the end of the entry field.
  459.                 <Insert>    =  Toggle between Insert and Overtype modes
  460.                 <Delete>    =  Delete character under the cursor.
  461.                 <BackSpace> =  Replace character under cursor with a
  462.                                blank space and move cursor one character
  463.                                to the left.
  464.                 <F1>        =  pop up on-line HELP screen.
  465.  
  466. REVINPUT is designed to be used as part of a full-screen data-entry
  467. system. Your program can examine the return code to determine whether the
  468. operator wishes to terminate entry or move forwards or backwards between
  469. entry fields.
  470.  
  471. See also the DATEINPUT function for a keyboard routine specially designed
  472. to ask the operator for a date!!!!
  473.  
  474.  
  475. ROUND
  476.  
  477. Rounds a double-precision number to the number of decimal places required
  478. and returns it as a string.
  479.  
  480. DECLARE FUNCTION Round$ (Number#, Places%)
  481.  
  482.  
  483. SCREENMODE
  484.  
  485. This function calls ROM-BIOS to check the current video mode and then
  486. converts the returned value to the equivalent QuickBASIC SCREEN number.
  487. It can detect the Hercules 720 x 348 graphics mode (SCREEN 3) and the new
  488. Olivetti 640 x 400 mode (SCREEN 4) as well as the Tandy 1000 and PCjr CGA
  489. modes (SCREENs 5 & 6) which are not supported by QuickBASIC.  Other
  490. unsupported graphics modes return a value of -1.
  491.  
  492. No calling parameters are required.
  493.  
  494. DECLARE FUNCTION ScreenMode% ()
  495.  
  496.  
  497. SETFLAG
  498.  
  499. This routine is used to set  one of the sixteen system flags to a value of
  500. between 0 and 255. These flags are situated in the Intra-Application
  501. Communications area, an area reserved by DOS for user programs to signal
  502. to each other. FLAG% is the flag number (1-16), VALUE% is the value you
  503. want to set.
  504.  
  505. DECLARE SUB SetFlag (Flag%, Setting%)
  506.  
  507. You can read the current setting of a particular IAC flag byte with the
  508. GETFLAG function.
  509.  
  510.  
  511. SORTFILE
  512.  
  513. expects the user to supply the name of the file to be sorted. The file,
  514. itself, must be fixed length and its name can include a drive letter and
  515. directory pathname. The logical record length of the file must also be
  516. supplied, along with the start position and length of the field which the
  517. file is to be sorted on.
  518.  
  519. The procedure returns with Done% set to -1 (logical TRUE), if the sort
  520. completed successfully, or to zero (logical FALSE) if an error occurred.
  521.  
  522. DECLARE SUB SortFile (PathName$, OffSet%, FieldLen%, RecordLen%, Done%)
  523.  
  524. The program first checks the size of the file and the amount of free disk
  525. space to see if the it can be sorted in memory, this requires space for
  526. two copies of the file on disk. If it is too large, the file is sorted in
  527. place so that no extra disk space is required. Using this method, which is
  528. far slower, the file may be of any size up to 4 Gigabytes.
  529.  
  530. Note:       If, when sorting in place on disk, SORTFILE detects that there
  531.             is a Ramdisk installed with enough free space to hold the file
  532.             that is being sorted, the program will copy and sort the file
  533.             there. This is much faster than a conventional disk sort, but
  534.             still not as fast as sorting directly in memory.
  535.  
  536.  
  537. VERMENU
  538.  
  539. Displays and operates a pulldown menu, allowing the user to select from
  540. the list of options displayed in the menu window. 
  541.  
  542. DECLARE SUB VerMenu (Row%, Col%, Attr%, Bdr%, Opts%, Title$, Menu$(),_
  543.                      Choice%, Nxt%, Bar%, Ctx%, Topic$, Mouse%)
  544.  
  545. Expects:  Row%, Col%    screen co-ordinates of top-left corner of the
  546.                         window containing the menu.
  547.           Attr%         display attribute given to menu window.
  548.           Bdr%          Border style (1 - 8, 0 = no border). see the
  549.                         WINDOWS documentation for a list of styles.
  550.           Opts%         Number of options provided by menu.
  551.           Title$        Title for the menu, if null string then no
  552.                         title is displayed.
  553.           Menu$()       Text for options list. MENU$(0) should contain
  554.                         a list of key characters, one for each option.
  555.                         Insert a space at the appropriate position of
  556.                         an option to be disabled.
  557.                         In the remaining option strings an ampersand '&'
  558.                         indicates that the next character is the Hotkey
  559.                         to be highlighted for that option.
  560.           Ctx%          If set, this indicates that context-sensitive
  561.                         help is available, in which case ...
  562.           Tpc$          The root name of the Topic file to be displayed
  563.                         if the user presses <F1> for help. The current
  564.                         selection number is appended to this to produce
  565.                         the actual filename.
  566.           Mouse%        If set, this flag indicates that a mouse is
  567.                         installed and can be used to make selections.
  568.  
  569. Returns:  Choice%       Number of selection made by user. If zero then
  570.                         the user pressed <ESC> to abort without making
  571.                         a selection.
  572.           Nxt%          Set TRUE if the user pressed the left or right
  573.                         arrow key to move sideways to another menu, in
  574.                         which case ....
  575.           Bar%          is incremented or decremented accordingly.
  576.  
  577. The BARMENU procedure provides a similarly featured menu which is
  578. orientated horizontally.
  579.  
  580. See the source code for DEMON.BAS, the Toolbox demonstration program, for
  581. an example of VERMENU (and BARMENU) in use.
  582.  
  583.  
  584. VIDEOMODE
  585.  
  586. Checks the video system capabilities of the host computer.
  587.  
  588. DECLARE SUB VideoMode (Colour%, MaxRes%, VideoRam%)
  589.  
  590. This function calls ROM-BIOS to check the type of display adaptor which is
  591. installed in the host system. Three variables are supplied which, on
  592. return, provide the following information:
  593.  
  594. COLOUR%   -1 = Colour adaptor   Indicates the presence of a colour
  595.            0 = Monochrome       monitor in EGA systems. Returns -1
  596.                                 for CGA, even if a mono monitor is
  597.                                 bring used.
  598. MAXRES%    highest SCREEN       Highest resolution graphics screen
  599.            resolution           which can be set. Is equivalent to
  600.                                 QuickBASIC SCREEN numbers. MDA can
  601.                                 only use SCREEN 0, CGA 0, 1 and 2
  602.                                 N.B. MaxRes% = 10 indicates an EGA
  603.                                 with mono monitor. This means that
  604.                                 SCREEN 9 can NOT be used.
  605. VIDEORAM%  in kilobytes         Amount of dedicated display memory
  606.                                 installed. 
  607.                                 MDA = 4K, CGA = 16K, EGA = 64-256K
  608.  
  609.  
  610. EXTRA ROUTINES FOR QB4
  611.  
  612. The following functions and procedures are only included in the version of
  613. the Toolbox intended for QuickBASIC 4.x and BASIC 6. They are omitted from
  614. the later version because the Extended QuickBASIC language provided with
  615. the BASIC 7 Professional Development System includes new statements and
  616. functions that render them unneccessary.
  617.  
  618.  
  619. CHANGEDIR
  620.  
  621. This procedure changes the current directory to the one specified by the
  622. pathname supplied. If a drive letter is included in the argument, the
  623. routine also changes the current drive.
  624.  
  625. DECLARE SUB ChangeDir (PathName$)
  626.  
  627. Microsoft have now added CHDIR and CHDRIVE statements to QBX, the new
  628. Extended QuickBASIC supplied with BASIC 7. Since these statements make
  629. CHANGEDIR redundant, it is not provided with the BASIC 7 Toolbox.
  630.  
  631.  
  632. WAITASEC
  633.  
  634. System-independent pause for a specified number of seconds. The delay will
  635. still be the same, whether you have an original IBM-PC or an AT with the
  636. latest Intel i486 processor running at 33MHz.
  637.  
  638. DECLARE SUB WaitaSec (Seconds!)
  639.  
  640. This is an alternative to the SLEEP statement, for people who still use
  641. QuickBASIC 4.0
  642.