home *** CD-ROM | disk | FTP | other *** search
/ POINT Software Programming / PPROG1.ISO / basic / mnusys21 / help.txt < prev    next >
Encoding:
Text File  |  1993-10-06  |  3.0 KB  |  75 lines

  1. Quick Help for Menusys-PB and Menulib V2.1
  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.         You must also include the following header in every Menusys/        
  18. Menulib program:
  19.  
  20. public scrnbuf?(min,2)        
  21. public explode%, flash%      
  22. public mouse%, segment&        
  23. public msx%, msy%, lb%, rb%    
  24. public topcount%, bottomcount%
  25. public mainclr%, mainbckg%     
  26. public clr%, bckg%             
  27. public clr1%, clr2%, clr3%    
  28. public bckg1%, bckg2%, bckg3%  
  29. public helpfn$, progname$     
  30.                               
  31.         If you don't include the above PUBLIC variable declarations, you'll                             
  32. get an "undefined externals" error when you try to compile your program.
  33.                              
  34.         Be sure that both MENUSYS.PBU and MENULIB.PBU exist in the
  35. directory that you've told PowerBASIC your .PBU files are in.
  36. It's also necessary to include ALL the PUBLIC statements shown
  37. in MNSSHELL.BAS, exactly as they appear.  It's recommended that you
  38. use the section "check mouse and video" in MNSSHELL.BAS in your
  39. programs, and alter the colors, etc. to suit your tastes.
  40.  
  41.         Check your PowerBASIC manual for further details on the correct
  42. use of .PBU files.
  43.  
  44.         MENUSYS.PBU and MENULIB.PBU were compiled using PowerBASIC 3.0C.
  45. If you are using a different version of PowerBASIC, these .PBU files may
  46. not work properly.  The registered version of Menusys/Menulib includes
  47. full source code, allowing you to recompile using your version of PB.
  48.         
  49.  
  50.         Menusys requires no special "event-driven" programming techniques.
  51. You simply check for either of the following conditions in the main loop
  52. of your program:
  53.  
  54. * If the mouse cursor is on the top row of the screen, and the left mouse
  55.   button is pressed, call the main MENUSYS routine to display the pulldown
  56.   menus.  Use the MCHECK sub, and the global variables MSY% and LB%.
  57.   For example:
  58.  
  59.   call mcheck
  60.   IF msy% = 1 AND lb% = 1 then goto dothemenu
  61.  
  62. * If the ALT key is pressed, call the main MENUSYS routine to display the
  63.   pulldown menus.  Use the ALTKEY% function.  For example:
  64.  
  65.   IF altkey% then goto dothemenu
  66.  
  67.         That's all there is to it!  The other routines in Menusys and Menulib
  68. you call as needed - for user input, menu selection, check boxes, etc.
  69.  
  70.         You can use the SUB printtopmenu to display the top (bar) menu at the
  71. start of your program.  Be sure to call this routine every time you erase 
  72. the screen if you want to "keep" a menu at the top of the screen at all times.
  73. See MNSDEMO.BAS to see how this routine can be used.
  74.  
  75.