Make a copy of \clipper5\include\std.ch as mystd.ch
Edit mystd.ch and add the line:
#translate inkey(0) => scrsaver()
Create a scrsaver() function that does whatever it should, but exits on INKEY().
FUNCTION scrsaver
LOCAL oldscr:=SAVESCREEN(0,0,24,79),i:=0,key:=0
CLEAR
DO WHILE key=0
@ 0,i SAY CHR(0)
key:=INKEY(1)
@ 0,i SAY " "
IF ++i>79
i:=0
ENDIF
ENDDO
RETURN key
Compile this as normal.
Re-compile all your source code with a /umystd.ch switch
Compile getsys.prg with a /umystd.ch switch and explicitly link it into your application.
This will catch all uses of INKEY(0), including the GET system. If you want to trap the MENU TO system, then you will need to write a replacement system and add it into mystd.ch as
#command SET MESSAGE TOwhere ss_setmess(), ss_prompt() and ss_menu() are your new functions.=> ss_setmess( ) #command SET MESSAGE TO => ss_setmess(0) #command @ ,
PROMPT [MESSAGE ] ; => ss_prompt( ,
, , ) #command MENU TO => :=ss_menu( )
Click here for my versions of these three functions. You are free to use these, provided you leave my copyright header in the code. Of course, you may need to comment out some bits that require the rest of my library to work, but that's part of the joy of using someone else's code, isn't it?
C++ (Usually MFC)
No code so far, but I've a screensaver you may like. It's written for Win 3.1, but does work with W95. It's called the Physicist's Desk because
Have fun.
If you're going to do a lot of adding & deleting, then you can add an
extra field to your table which indicates whether the record is
"alive" or "dead". Then, instead of deleting, you set the flag to
"dead". When adding, you find a "dead" record & overwrite it. If there isn't a "dead" record, then add a new one.
Frequently Asked Questions
Not a full list, but a gradually-incresing set of questions I've answered, normally on UseNet.
Why does my Access MBD keep on growing?
Access (in common with other RDBMs) doesn't do garbage
collection unless told to (via it's "Compact & Repair" option). So each deleted record
is still hogging space.

Back to the home page