Page 1 of 1

Graphic stuff

Posted: Fri Aug 05, 2005 3:56 am
by Seb McClouth
Draw table:

QBinux setup was supposed to build in textmode... But I needed line 24 of my screen (through locate 24,1) already from when I started programming with QBasic I knew this isn't possible.

So took screen 9 and used some GPrint (actually the one by Toshi, I think) Didn't look good in the end.

Moved to screen 12: looks good, drawing math is completly stressfull... so I guess to keep the non-vga users (like there are any) happy, I need to do the thingy in text mode. How can I use line 24 without having my line 1 dissappear and have blank (black) line between 23 and 24?

grtz
Seb

Posted: Fri Aug 05, 2005 4:53 am
by Antoni
If you put a semicolon at the end of each PRINT and your lines don't overflow the allowed 80 chars, you should not have unwanted scrolls.
This code does not scroll for me.( I'm in Windows 2000)
It uses an 1 line bufer where everything is copied with LSET and MID$ (to avoid to change its size) before printing it

Code: Select all

B$=SPACE$(80)
t!=TIMER
DO
  COLOR RND+14
  A%=INT(RND*25)+1
  'fill the buffer
  LSET B$=">THIS IS LINE "+STR$(A%)
  MID$(B$,77)="<<<"
  'print it
  LOCATE A%,1
  PRINT b$;
  'slow it down!
  DO:LOOP UNTIL TIMER>t!:T!=TIMER
LOOP UNTIL LEN(INKEY$)

Posted: Fri Aug 05, 2005 5:33 am
by Seb McClouth
I program in pure DOS. I had this problem with QBasic and I have it also with QuickBasic.

When I give as a command

Code: Select all

LOCATE 25, 1: PRINT "Hello"
It says in screen 0, that it can't find the line (I get that) but when
in screen 9 or 12 it does what I said in my first post.

grtz
Seb

Posted: Fri Aug 05, 2005 5:44 am
by Antoni
I have had problems with line 25 scrolling, but I never had that line 25 not found you have.I have not used pure DOS since 1995...

What happens if you issue a WIDTH 80,25 before printing?

Posted: Fri Aug 05, 2005 7:40 am
by Seb McClouth
Basically the same. But I'll try your code.

So I should be able to use this with your explaining:

Code: Select all

Locate 24,1:?" <Tab>/<Alt-tab>"
Correct?

grtz
Seb

Posted: Fri Aug 05, 2005 8:09 am
by Antoni
this works for me:

Code: Select all

width 80,25
Locate 23,1:?" <Tab>/<Alt-tab>";
Locate 24,1:?" <Tab>/<Alt-tab>";
Locate 25,1:?" <Tab>/<Alt-tab>";
No room between the 3 lines, and the bottom line is in the border of the screen. Just gave a semicolon after each print and never go beyond col 80, this is what my buffer method does.

Posted: Fri Aug 05, 2005 10:32 am
by SebMcClouth
Marvelous!!

Thanks for the hint!!

grtz
Seb

Posted: Fri Aug 05, 2005 5:21 pm
by Xerol
Believe it or not, there's a slight holdover from GWBasic still in QBasic. If anyone remembers GW, there was the line of 'hotkeys' at the bottom. "KEY OFF" at the beginning of the program would turn that display off and allow you to PRINT to that line. This also fixes the line 25 scrolling problem in QB.