The QBasic Forum     RULES     Other Subforums, Links and Downloads    Index of Threads

  << Previous Topic | Next Topic >>Return to Index  

Simple scrolling text displayer.

February 4 2006 at 11:41 PM
  (Login NEWK1234)
R

I guess its been a while since anyone here has seen any of my programs, so I thinks its hight time I contributed something. This is a very simple scrolling text file displayer. It has a few bugs, but it works fine.

I would love suggestions to make it better, but please, don't totaly re-write the program for me. I;d like at least some of the origianl code to remain intact. Thanks and....
May the Force be with y'all!

The controls are fairly self-explanatory:
Up and Down arrow keys are used for scrolling
Enter ends the program.

CLS
INPUT "What is the path to the file you wish to be displayed"; filename$
OPEN filename$ FOR INPUT AS #1
DIM COOL$(1000)
DO
num = num + 1
IF EOF(1) THEN EXIT DO
LINE INPUT #1, lin$
COOL$(num) = lin$
LOOP
maxnum = 20

start:
num = 0
WHILE num < maxnum
num = num + 1
PRINT COOL$(num)
WEND
WHILE KEYPRESS$ <> CHR$(13)
KEYPRESS$ = INKEY$
IF KEYPRESS$ = CHR$(0) + CHR$(80) THEN maxnum = maxnum + 1
IF KEYPRESS$ = CHR$(0) + CHR$(80) THEN GOTO start
IF KEYPRESS$ = CHR$(0) + CHR$(72) THEN maxnum = maxnum - 1
IF KEYPRESS$ = CHR$(0) + CHR$(72) THEN GOTO start
IF maxnum < 0 THEN maxnum = 0
WEND

CLOSE


 
 Respond to this message   
AuthorReply

(Login matthewr2_1)

Read me please

February 4 2006, 11:48 PM 

go here: http://www.network54.com/Forum/message?forumid=178387&messageid=1120012


after that, post a new thread called "NEWK", tell us a little about yourself and what you like to program, etc... and post links to programs in replies to that thread.

 
 Respond to this message   

(Premier Login iorr5t)
Forum Owner

The URL you posted is incorrect, mathew2_1 (URL*)

February 9 2006, 8:27 AM 

http://www.network54.com/Forum/message?forumid=178387&messageid=1120012918

 
 Respond to this message   
Current Topic - Simple scrolling text displayer.
  << Previous Topic | Next Topic >>Return to Index