home *** CD-ROM | disk | FTP | other *** search
-
- '================================[ SUBROUTINES ]==============================
-
- '******************************************************************************
- '* Depending on how FED is implemented, most all of the FED Exit codes (aka *
- '* FCODEs), can be handled in a GOSUB similiar to the following. *
- '* Regardless of what field they are editting, F9, F10, F1, PgUp, PgDn etc *
- '* all mean the same thing to FED: EXIT. What you do, based on the FCODE, *
- '* controls the flow of the program. Generally, the Up Arrow (fcode=5), *
- '* ENTER, and Dn Arrow, (fcodes 0 and 6) are best handled prior to getting *
- '* here, they "fall thru" to the next label rather than being routed here. *
- '* See FED-DEMO for examples. *
- '* Some sort of routine like this is essential to FED's operation. *
- '* *
- '* PUT YOUR OWN LABELS IN FOR CORRECT OPERATION !!!! *
- '******************************************************************************
-
- chgfld:
-
- IF edt THEN ' This part is not critical,
- COLOR bgb, fgb ' but shows user when current
- LOCATE 1, 35 ' record is different from data
- PRINT " [ EDITING ] " ' in file.
- ELSE
- COLOR fgb, bgb
- LOCATE 1, 38
- PRINT STRING$(15, 205); ' overwrite EDITING flag
- END IF
- COLOR fg,bg
-
-
- SELECT CASE fcode ' CASE is new to QB 3.0 - will not compile in 2.x
-
- CASE 1 ' F1 key pressed (HELP)
- CALL svscrn(sptr2%) ' save screen as is
- CALL wdw(7, 12, 17, 72, 1, 1, 2, hattr,"Editing Help")
-
- GOSUB display.help.window
-
- GOSUB wait.key ' do a 'Press any key..." routine
-
- CALL rstscrn(sptr2%) ' restore pre help screen
- RETURN ' RETURN to next label
-
- CASE 2 ' F2
- ' include code for your F2 function
- RETURN xxx
-
- CASE 3 ' F3
- ' include code for your F3 function
- RETURN xxx
-
-
- CASE 4 ' F4
- ' include your F4 code handling here
- RETURN xxx
-
- ' 5 and 6 are arroq keys. Handle OUTSIDE of this for speed !
-
-
- CASE 7 ' F7
- ' include code for your F7 function
- RETURN xxx
-
- CASE 8 ' F8
- ' include code for your F8 function
- RETURN xxx
-
-
- CASE 9, 15 ' F9, ESC
- ' include your own code handling ' F9 and Esc do not HAVE to be
- RETURN xxx ' coupled, but this is how to do it
- ' with CASE
-
- CASE 10 ' F10 save record
- ' include code for your F10 function
- RETURN xxx
-
-
- CASE 11 'Pg Up
- ' include code for your PgUp function
- RETURN xxx
-
-
- CASE 12 ' Ctrl Pg Up
- ' include code for your Ctrl-PgUp function
- RETURN xxx
-
-
- CASE 13 'Pg Dn
- ' include code for your PgDn function
- RETURN xxx
-
-
- CASE 14 'Ctrl - Pg Dn
- ' include code for your Ctrl - PgDn function
- RETURN xxx
-
-
- END SELECT