Page 1 of 1

Simple Database Question

Posted: Sat Dec 03, 2005 4:22 pm
by Guest
Hi,

I created a database program that allowed the entry of multiple records, and the option to view these records.

The problem is, that if there are more than 30 or so records, then the program scrolls through them until it reaches the last record. This means that there are records above the screen that can't be seen.

In DOS, you can use "dir /p" in order to view all files, and it stops scrolling until you're ready to see the next lot. Is there a way that this can be done in QBasic?

Thanks for your help.

Posted: Sat Dec 03, 2005 4:40 pm
by Guest
This is one option:

Code: Select all

A% = MaxLineOfData
b%=1
DO
   YOUR_PRINT_CODE_HERE
   if b% < 22 THEN b%=b%+1
   if b% = 22 THEN INPUT"PRESS ANY KEY TO CONTINUE":b%=1
Loop while b% < a%
Next time, show your code... then it is easier to help out...

grtz
Seb

Posted: Sat Dec 03, 2005 11:31 pm
by Antoni
my dirty one-liner

Code: Select all

ln=ln+1:if ln=22 then ln=0:locate 25,1: print "More?";:k$=input$(1):locate ,1:print space$(5);

Posted: Sun Dec 04, 2005 10:19 am
by Guest
Even better... thx Antoni