home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 17 / CD_ASCQ_17_101194.iso / vrac / menusys.zip / MENUSYS.DOC < prev   
Text File  |  1994-08-07  |  4KB  |  74 lines

  1.              MENUSYS - A PULL-DOWN MENU SYSTEM DEMONSTRATION PROGRAM
  2.  
  3. Module MENUSYS.BAS can be loaded and run as a QuickBasic 4 or MS-DOS QBasic
  4. program.  It demonstrates a conventional pull-down menu system with bounce
  5. bar that can be moved by the cursor control keys and menu items with 
  6. highlighted keys for quickly accessing a menu item by Alt-key combinations.
  7. F10 plus a highlight letter also accesses the main menu item.  Other keys 
  8. such as Alt-U for Up, Alt-L for left, Alt-H for home and space bar for 
  9. down also move the bounce bar and provides speed in making menu selections.  
  10. In general <Enter> accepts an item and <Esc> allows you to back out of a 
  11. given menu level or program area.
  12.  
  13. Menu selections lead to scroll boxes and dialog boxes (if the menu item ends
  14. with " ..." ).  A simple block text editor is included, which you can use
  15. not only for editing single fields on one line, but for simple ASCII word
  16. processing without wordwrap.
  17.  
  18. The program module and menu system routines are designed to allow development
  19. of your program with minimal effort.  The main module defines the screen  
  20. control and system (hardware, in this case only video adapter) variables.  
  21. You may also have file or other program specific TYPE variables.  A set-up
  22. routine is called to initialize parameters.  In MENUSYS, only the program 
  23. color scheme is set.  DATA statements define the menu system.  Once you gain
  24. experience with the menu variables covered in the DATA statements and have
  25. an overall program map or structure defined, you can literally define a menu 
  26. system for your program in minutes.
  27.  
  28. If you have a VGA, you can define some more appealing color combinations
  29. using PALETTE statements.  However, using default colors, included in the
  30. SetUpPgm routine are good combinations for Monochrome (MDA), CGA, EGA, and 
  31. VGA adapters.  Since your program can't see past the adapter to what monitor 
  32. is attached, there is provision for user input of a monochrome monitor
  33. attached to a CGA through VGA adapter.   You can experiment with different
  34. color combinations by altering statements in SetUpPgm.  If you would like to
  35. have QuickBasic routines to read the command line and determine system 
  36. hardware directly, see the file SUPPRT.ZIP in this MS Basic Library.  For 
  37. testing, note that portables and laptops with monochrome versions of color 
  38. adapters, and especially LCD displays, present challenges to have effective 
  39. color schemes for your program.
  40.  
  41. The primary action of your program occurs in routine MainCalc which shows 
  42. how to convert menu selections into redirection to proper areas of your
  43. program.  Examples are included.  You can actually start from a copy of
  44. MENUSYS and modify to your program action and save under a new program
  45. name.  MENUSYS remains as a template for future programs.  The menu routines
  46. can be used as is without changing.  In addition to BlkEdit, which is the
  47. simple text editor, BoxDisplay and BoxDraw will be especially useful for a
  48. number of programming chores.  KeyPress should be used for all user input,
  49. since you have complete control over what action to take given the return
  50. variable KeyCode.
  51.  
  52. DialogBox is the most complicated routine, but is a very powerful and
  53. flexible tool for setting up controlled user input.  Study the provided
  54. examples.  It is designed to allow original program defaults, defaults
  55. stored in startup files, and resetting to earlier session variables if the
  56. user changes his mine or makes a mistake.  That is the reason for the 
  57. multiple string parameter list and execution code variable (DBCode).  
  58. Remember in any testing of your program, try all sorts of keyboard input to
  59. see if you can hang up your program.
  60.  
  61. Feel free to modify MENUSYS to better meet your programming requirements.  I
  62. hope this helps simplify development for you.  For QuickBasic programmers
  63. who can access CALL INTERRUPT, integrating mouse routines with MENUSYS can
  64. be done.  This is not trivial since MENUSYS was written originally for 
  65. convenient keyboard input in a rodent-free world.  If you want mouse aware
  66. menu systems, more speed, and more capabilities, such as constructing input
  67. screens, there are a number of such programs available in this library.
  68.  
  69. If you have questions or comments, I would appreciate hearing from you.
  70.  
  71. Brian Dinsmoor
  72. 76675,1606
  73. August 7, 1994
  74.