Posts: 5
Threads: 4
Joined: Mar 2003
is there a way to make text blink? If so, how?
Also, can I put a color border around the outside of the screen?
Also, is there a way to make the font bigger in a program?
Thank you
-TECHsector
Posts: 2,020
Threads: 24
Joined: Jun 2002
i believe, this is just a rumor, but if you choose a color higher than 16 for your foreground color in screen zero, it takes that color minus 16 and blinks it.
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Posts: 9
Threads: 1
Joined: Oct 2002
Before I knew that there were only 16 colors, I was using colors like 20 and, yes, they did blink!
Posts: 704
Threads: 0
Joined: Dec 2002
'
' This program displays the different color/background/blinking
' combinations you can get in QB's SCREEN 0 video mode using different
' attributes and POKE.
'
DIM I AS INTEGER,J AS INTEGER,ATTR AS INTEGER,OS AS INTEGER,K AS INTEGER
SCREEN 0
WIDTH 80
CLS
'
' Attributes will be changed by directly modifying video memory.
'
DEF SEG=&HB800
'
' "Turn off" display until it's generated.
'
OUT &H3C6,0
FOR I=0 TO 15
'
' Set offset to beginning of line I (with respect to attribute, not
' character position).
'
OS=I*160+1
FOR J=0 TO 15
ATTR=I*16+J
'
' Display attribute value in color of that attribute. (Always print out
' a 3-digit string, prepadding with zeros if necessary.)
'
ATTRSTR$=LTRIM$(STR$(ATTR))
WHILE LEN(ATTRSTR$)<3
ATTRSTR$="0"+ATTRSTR$
WEND
PRINT ATTRSTR$;
'
' Character's on screen. Change attributes.
'
FOR K=1 TO 3
POKE OS,ATTR
OS=OS+2
NEXT K
'
' Print space of attribute 0 (unless J = 15).
'
IF J<15 THEN PRINT " "; : OS=OS+2
NEXT J
'
' Move print position to next line.
'
PRINT
NEXT I
DEF SEG
'
' Print message to user.
'
PRINT
PRINT " The numbers indicate the color/background/blinking combination you"
PRINT "can get when you POKE the particular attribute value into video memory."
PRINT "(And maybe looking at the code for this program will show you how to do"
PRINT "that if you don't already know.)"
'
' Turn screen back on and pause so screen can be viewed before END clears
' it.
'
OUT &H3C6,255
WHILE INKEY$="" : WEND
END
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Posts: 3,616
Threads: 287
Joined: Jan 2003
Hehe, you don't use colors over 16.
This makes a green message blink:
Code:
clr=2 '2=green
COLOR clr+16 'Add 16 to any color, and make it blink :-)
PRINT "Blink"
Add 16 to any color (only in text mode) and get it to blink.
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Posts: 3,616
Threads: 287
Joined: Jan 2003
Oops! You already said that, toonski64!
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Posts: 1,752
Threads: 21
Joined: Jun 2002
You can add a color border by changing the overscan color:
Code:
'$INCLUDE: 'QB.BI'
DIM Regs AS RegType
Regs.ax = &HB00
Regs.bx = BorderColor
INTERRUPT &H10, Regs, Regs
(BorderColor is 0-63)
In order for this to work, you'll need to start QB with the /L switch to enable interrupts. If you're using QBasic, you can change the overscan color directly by writing to index 11h of the VGA attribute controller (3C0h).
Posts: 2,020
Threads: 24
Joined: Jun 2002
interrupts are such a magical, mysterious thing, aint they?
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Posts: 704
Threads: 0
Joined: Dec 2002
Then they're just annoying.
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Posts: 1,845
Threads: 44
Joined: Aug 2002
No, they are not!!!!
LoL
I'd printed out the entire interrupt list (yes, 00h - FFh) and I paid for it, and I'm planning to make a library of it
. The book was 1250 pages