Xref: utzoo comp.databases:3519 comp.sys.ibm.pc:34217 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!hellgate.utah.edu!cs.utexas.edu!usc!ucsd!nosc!cod!heflin From: heflin@cod.NOSC.MIL (Greg R. Heflin) Newsgroups: comp.databases,comp.sys.ibm.pc Subject: Re: dBase III+ menu programming question Message-ID: <1628@cod.NOSC.MIL> Date: 5 Sep 89 22:18:25 GMT References: <2151@umiami.miami.edu> <3827@infocenter.UUCP> Reply-To: heflin@cod.nosc.mil.UUCP (Greg R. Heflin) Organization: Naval Ocean Systems Center, San Diego Lines: 48 In article <3827@infocenter.UUCP> mraustad@infocenter.UUCP (Mike Raustad) writes: >In article <2151@umiami.miami.edu>, SLORES@umiami.miami.edu (Stanislaw L. Olejniczak) writes: >> In dBase III+ I would like to present a user with a menu, and then have >> the user press one of the FUNCTION keys to choose a menu item. I do know >> I cannot reprogram F1, but I can live with that. If possible, I would >> also like very much to display running day's time on the display while >> waiting for a keypress. >> > The SET FUNCTION command at menu startup will program your function > keys. As for displaying running day's time, I would like to know how to > do this. Does anyone have any ideas? > / MIKE RAUSTAD __ ENCORE COMPUTER CORP. / 6901 W. Sunrise Blvd. / I'm unable to upload the code at the moment, so a verbal ramble will have to suffice . . . By looping with the INKEY() function, one can continuously compare keys pressed against an acceptable set, doing anything one wants in the dead time. Here is an example code fragment: DO WHILE .T. DO MENUMASK * procedure to draw menu on screen i=0 DO WHILE i=0 i=INKEY() @ 17,63 SAY TIME() IF UPPER(CHR(i))$"ABCDEFGWZQ" EXIT ENDIF i=0 ENDDO @ 23,58 SAY CHR(i) * process user's response DO CASE * test for exit CASE CHR(i) $"Zz" DO LOGOUT ENDCASE ENDDO **************************88 If you need more explicit info - drop me a line, maybe by then I will be able to upload files again. gregory NAVELEX,SD -- -gregory Just my two cents which shouldn't make a flame, unless you rub them real hard.