home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
PROG_BAS
/
MNUSYS22.ZIP
/
HELP.TXT
< prev
next >
Wrap
Text File
|
1994-01-13
|
3KB
|
78 lines
Quick Help for Menusys-PB and Menulib
-------------------------------------
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"
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.
Mouse Problems
--------------
You may occasionally run into a situation where MSHOW or MHIDE
won't show or hide the cursor the way it should. This is due to the way
the mouse driver increments and decrements its internal flag each time
one of the routines is called. For example, if you call MSHOW twice,
you'll need to call MHIDE twice to make the mouse cursor disappear.
Menusys routines interact with each other in a complex way, and occasionally
an extra MSHOW or MHIDE call may be executed, causing the next command to
decrement or increment the internal mouse cursor flag (the cursor is hidden
when the flag is zero, and showing above zero), but not actually show or hide
the cursor the way it should. If you have this problem, try one of the
following:
* Call MSHOW or MHIDE more than once if needed. This will not cause any
problems, and is a quick solution.
* Call MSOFTRESET to hide the mouse cursor. This also resets the mouse
driver's internal flag. You can then call MHIDE, and the mouse cursor
will always appear.
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.