home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / basic / library / qb_pds / screen / hilite / hilite.doc < prev    next >
Encoding:
Text File  |  1993-09-18  |  3.3 KB  |  67 lines

  1.  QuickBasic Subroutine to Highlight Menu Items, Pick Lists, and Other Text
  2.  Placed in the Public Domain, 09/18/93 by Dave Wright, CIS 76635,1136
  3.  ----------------------------------------------------------------------------
  4.  
  5.    HILITE.BAS     QuickBasic Subroutine to Highlight selected text 
  6.    HILITE.OBJ     QB45 .OBJ File for HILITE.BAS
  7.    HILITE.DOC     This Documentation File
  8.  HILIDEMO.EXE     Demo of HILITE.BAS
  9.  HILIDEMO.BAS     Source Code for HILIDEMO.EXE
  10.  HILIDEMO.OBJ     QB45 .OBJ File for HILIDEMO.BAS
  11.  
  12.  HiLite is a simple demonstration program of a method to highlight selected
  13.  text.  This is useful for menuing systems, pick lists and various other
  14.  tasks when programing in QB.  There are several programs within the Public
  15.  Domain which accomplish the same task as HiLite; however, most of the other
  16.  programs rely upon dimensioning string arrays which can add considerable
  17.  overhead to programs and eat up valuable string storage space.  HiLite does
  18.  not "rewrite" string arrays using a highlight color, but rather Pokes a new
  19.  color attribute at the proper offset to the video memory segment at &HB800.
  20.  Therefore, it will function on all 4 text video pages of a CGA or better.
  21.  
  22.  When the highlight bar is repositioned by the cursor keys, HiLite Pokes the
  23.  selected color attribute, first to the currently highlighted item to return
  24.  it to its default colors, and then Pokes the selected color attribute to the 
  25.  newly highlighted item.  The user will note that HiLite is set to one column 
  26.  lists.  However, with very little effort, the Select Case Loop could be 
  27.  modified to allow for multiple column lists, and rows greater than the 
  28.  physical dimensions of the display screen.  
  29.  
  30.  HiLite can be added to a Library, Loaded as a Subprogram within the QB 
  31.  Environment, or its object file linked with a program, from the Command
  32.  Line.
  33.  
  34.  Declaration for HiLite, placed in your Program:
  35.     DECLARE SUB HiLite (Row%,Col%,Length%,MaxRow%,DeAttr%,HiAttr%,RetCode%)
  36.     
  37.  Syntax for call to HiLite from your Program:
  38.     HiLite Row%, Col%, Length%, MaxRow%, DeAttr%, HiAttr%, RetCode%
  39.  
  40.          Row%   Row of the 1st item to be HiLited    
  41.          Col%   Column where HiLiting will start   
  42.       Length%   Length of the HiLite Bar
  43.       MaxRow%   Last row of the HiLite list
  44.       DeAttr%   Default Color Attribute of the HiLite List
  45.       HiAttr%   HiLite Color Attribute for the HiLite Bar
  46.      RetCode%   Value returned from HiLite to your program.  
  47.                 
  48.                 If Enter is pressed HiLite returns to the calling program
  49.                 and the relative position of the selected item within the
  50.                 list is returned by RetCode%.  
  51.                 
  52.                 If Esc is pressed HiLite returns to the calling program
  53.                 and the value -27 is returned by RetCode%.
  54.  
  55.                 If Alt is pressed HiLite returns to the calling program
  56.                 and the value -8 is returned by RetCode%.
  57.  
  58.                 Once again, these codes could be easily modified if so    
  59.                 desired.
  60.  
  61.  Perusal of HILIDEMO.BAS should provide the user with a full understanding 
  62.  of how HiLite functions.  Questions or comments are welcome.                
  63.  
  64.  Dave Wright
  65.  CIS 76635,1136
  66.           
  67.