home *** CD-ROM | disk | FTP | other *** search
EPOC OPL Source | 1999-09-10 | 3.0 KB | 107 lines |
-
-
- REM !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- REM ! !
- REM ! POPUP DEMO !
- REM ! !
- REM ! (c) 1999 M.O'Neill !
- REM ! !
- REM ! http://www.i27.com popup@i27.com !
- REM ! !
- REM !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
- REM **************************Start**************************
- PROC start:
- GLOBAL PopPath$(255)
-
- REM remember to place PopUp.OPM and SCROLL.MBM in the same
- REM folder as your application!!!
-
- PopPath$="\System\OPM\PopUp.OPM"
- IF EXIST("C:"+PopPath$)
- PopPath$="C:"+PopPath$
- ELSEIF EXIST("D:"+PopPath$)
- PopPath$="D:"+PopPath$
- ELSE
- BUSY "Cannot find PopUp.OPM - please install PopUp.SIS...",0
- PAUSE 80
- STOP
- ENDIF
-
- LOADM PopPath$ REM load the PopUp Module!!
-
- gAT 50,80 : gPRINT "Press any key for a popup demonstration"
- gAT 50,100 : gPRINT "with a 13 point Times font, (fontn%=9)"
- gAT 50,120 : gPRINT "and an 80 pixel PopUp height..."
- GET
- Main:
- ENDP
-
- REM ***************************Main**************************
- PROC Main:
- LOCAL p$(255)
-
- REM set the path to where this app ran from, else dat$ must
- REM contain the FULL path to the temporary file
-
- SETPATH CMD$(1)
-
- REM call the popup procedure, place return value into variable
- REM where "temp.dat" is the name of your temporary database
-
- p$=PUCreatePopup$:(60,52,1,80,"temp.dat",1,9)
-
- REM (optional) check if a system command was been sent
- REM whilst PopUp was active...
-
- IF p$="_PUSysCommand_X_"
- REM or "_PUSysCommand_C_" or "_PUSysCommand_O_"
- REM do your System Command handling here!
- PRINT CHR$(7)
- gIPRINT "System Command X was sent!"
- PAUSE 80
- STOP
- ENDIF
-
- REM else, once you've got the result, do what you want with it!
-
- IF p$<>"" REM if PopUp wasn't cancelled...
- gCLS
- gAT 200,20 : gPRINT "You selected "+CHR$(34)+p$+CHR$(34)
- AT 5,5
- gAT 200,60 : gPRINT "Press any key for a popup demonstration",
- gAT 200,80 : gPRINT "with the DEFAULT PopUp font, (fontn%=0)"
- gAT 200,100 : gPRINT "and a MAXIMUM HEIGHT (hi%=gHEIGHT-5) PopUp..."
- GET
- ELSE REM PopUp was cancelled...
- gCLS
- gAT 220,120
- gPRINT "PopUp was cancelled..."
- GET
- STOP
- ENDIF
-
- REM or find out which record number it was instead...
-
- p$=PUCreatePopup$:(0,0,0,gHEIGHT-5,"temp.dat",0,0)
- IF p$="_PUSysCommand_X_"
- PRINT CHR$(7)
- gIPRINT "System Command X was sent!"
- PAUSE 80
- STOP
- ELSEIF p$<>"" REM if PopUp wasn't cancelled...
- gCLS
- gAT 200,120 :gPRINT "You selected record number",p$
- gAT 200,140 :gPRINT "Press any key to close..."
- GET
- ELSE REM PopUp was cancelled...
- gCLS
- gAT 220,120
- gPRINT "PopUp was cancelled..."
- GET
- STOP
- ENDIF
- ENDP
-
-
-