home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_BAS / MNUSYS22.ZIP / HELP.TXT < prev    next >
Text File  |  1994-01-13  |  3KB  |  78 lines

  1. Quick Help for Menusys-PB and Menulib
  2. -------------------------------------
  3.  
  4.         If you're having problems getting Menusys and/or Menulib
  5. to work, study the file MNSSHELL.BAS carefully.  It outlines the
  6. commands necessary to add to your programs so they'll work correctly
  7. with Menusys.  You must ALWAYS start your programs that use Menusys
  8. .PBU routines with the following:
  9.  
  10. $COMPILE EXE
  11. $LINK "MENUSYS.PBU"
  12.  
  13. and additionally, if they use Menulib routines,
  14.  
  15. $LINK "MENULIB.PBU"
  16.  
  17.         Be sure that both MENUSYS.PBU and MENULIB.PBU exist in the
  18. directory that you've told PowerBASIC your .PBU files are in.
  19. It's also necessary to include ALL the PUBLIC statements shown
  20. in MNSSHELL.BAS, exactly as they appear.  It's recommended that you
  21. use the section "check mouse and video" in MNSSHELL.BAS in your
  22. programs, and alter the colors, etc. to suit your tastes.
  23.  
  24.         Check your PowerBASIC manual for further details on the correct
  25. use of .PBU files.
  26.  
  27.  
  28. Mouse Problems        
  29. --------------
  30.  
  31.         You may occasionally run into a situation where MSHOW or MHIDE
  32. won't show or hide the cursor the way it should.  This is due to the way
  33. the mouse driver increments and decrements its internal flag each time
  34. one of the routines is called.  For example, if you call MSHOW twice,
  35. you'll need to call MHIDE twice to make the mouse cursor disappear.
  36. Menusys routines interact with each other in a complex way, and occasionally
  37. an extra MSHOW or MHIDE call may be executed, causing the next command to
  38. decrement or increment the internal mouse cursor flag (the cursor is hidden 
  39. when the flag is zero, and showing above zero), but not actually show or hide
  40. the cursor the way it should.  If you have this problem, try one of the 
  41. following:
  42.  
  43. * Call MSHOW or MHIDE more than once if needed.  This will not cause any
  44.   problems, and is a quick solution.
  45.  
  46. * Call MSOFTRESET to hide the mouse cursor.  This also resets the mouse
  47.   driver's internal flag.  You can then call MHIDE, and the mouse cursor
  48.   will always appear.
  49.  
  50.  
  51.         Menusys requires no special "event-driven" programming techniques.
  52. You simply check for either of the following conditions in the main loop
  53. of your program:
  54.  
  55. * If the mouse cursor is on the top row of the screen, and the left mouse
  56.   button is pressed, call the main MENUSYS routine to display the pulldown
  57.   menus.  Use the MCHECK sub, and the global variables MSY% and LB%.
  58.   For example:
  59.  
  60.   call mcheck
  61.   IF msy% = 1 AND lb% = 1 then goto dothemenu
  62.  
  63. * If the ALT key is pressed, call the main MENUSYS routine to display the
  64.   pulldown menus.  Use the ALTKEY% function.  For example:
  65.  
  66.   IF altkey% then goto dothemenu
  67.  
  68.         That's all there is to it!  The other routines in Menusys and Menulib
  69. you call as needed - for user input, menu selection, check boxes, etc.
  70.  
  71.         You can use the SUB printtopmenu to display the top (bar) menu at the
  72. start of your program.  Be sure to call this routine every time you erase 
  73. the screen if you want to "keep" a menu at the top of the screen at all times.
  74. See MNSDEMO.BAS to see how this routine can be used.
  75.  
  76.  
  77.  
  78.