home *** CD-ROM | disk | FTP | other *** search
- Quick Help for Menusys-PB and Menulib V2.1
- ------------------------------------------
-
- If you're having problems getting Menusys and/or Menulib
- to work, study the file MNSSHELL.BAS carefully. It outlines the
- commands necessary to add to your programs so they'll work correctly
- with Menusys. You must ALWAYS start your programs that use Menusys
- .PBU routines with the following:
-
- $COMPILE EXE
- $LINK "MENUSYS.PBU"
-
- and additionally, if they use Menulib routines,
-
- $LINK "MENULIB.PBU"
-
- You must also include the following header in every Menusys/
- Menulib program:
-
- public scrnbuf?(min,2)
- public explode%, flash%
- public mouse%, segment&
- public msx%, msy%, lb%, rb%
- public topcount%, bottomcount%
- public mainclr%, mainbckg%
- public clr%, bckg%
- public clr1%, clr2%, clr3%
- public bckg1%, bckg2%, bckg3%
- public helpfn$, progname$
-
- If you don't include the above PUBLIC variable declarations, you'll
- get an "undefined externals" error when you try to compile your program.
-
- Be sure that both MENUSYS.PBU and MENULIB.PBU exist in the
- directory that you've told PowerBASIC your .PBU files are in.
- It's also necessary to include ALL the PUBLIC statements shown
- in MNSSHELL.BAS, exactly as they appear. It's recommended that you
- use the section "check mouse and video" in MNSSHELL.BAS in your
- programs, and alter the colors, etc. to suit your tastes.
-
- Check your PowerBASIC manual for further details on the correct
- use of .PBU files.
-
- MENUSYS.PBU and MENULIB.PBU were compiled using PowerBASIC 3.0C.
- If you are using a different version of PowerBASIC, these .PBU files may
- not work properly. The registered version of Menusys/Menulib includes
- full source code, allowing you to recompile using your version of PB.
-
-
- Menusys requires no special "event-driven" programming techniques.
- You simply check for either of the following conditions in the main loop
- of your program:
-
- * If the mouse cursor is on the top row of the screen, and the left mouse
- button is pressed, call the main MENUSYS routine to display the pulldown
- menus. Use the MCHECK sub, and the global variables MSY% and LB%.
- For example:
-
- call mcheck
- IF msy% = 1 AND lb% = 1 then goto dothemenu
-
- * If the ALT key is pressed, call the main MENUSYS routine to display the
- pulldown menus. Use the ALTKEY% function. For example:
-
- IF altkey% then goto dothemenu
-
- That's all there is to it! The other routines in Menusys and Menulib
- you call as needed - for user input, menu selection, check boxes, etc.
-
- You can use the SUB printtopmenu to display the top (bar) menu at the
- start of your program. Be sure to call this routine every time you erase
- the screen if you want to "keep" a menu at the top of the screen at all times.
- See MNSDEMO.BAS to see how this routine can be used.
-
-