Backround

 BBS: Inland Empire Archive
Date: 04-16-92 (20:50)             Number: 135
From: MIKE MCFARLAND               Refer#: NONE
  To: MIKE MELAMED                  Recvd: NO  
Subj: Backround                      Conf: (2) Quik_Bas
MM>How do you get background of a certain spot 1,1 for example? I know
that MM>to get forground, you should do this: A=SCREEN(1,1,1):A=A AND 15

Hi Mike,

DEFINT A-Z
CLS
COLOR 15, 1               'Combined value = 31
LOCATE 1, 1
PRINT " A "               '*Note: 1, 1 = " "  = chr$(32)
                          '       does not display a foreground

X = SCREEN(1, 1, 1)       'Read color
PRINT X                   'Combined value = 31

'* * Divide Color * *
Colr = X
FColr = (Colr - BColr * 16) -16 * i     <------ Foreground = 15
BColr = INT((Colr + 16) / 16) - 1       <------ Background = 1
PRINT "Test"

Have fun and let me know,
  Mike

  OLX 2.2  I'm in shape ... round's a shape isn't it?

--- RBBSMail 17.3B
 * Origin: Ten Forward RBBS-PC, Aurora, CO (303) 751-4119 (1:104/532)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET