Hi,
The following code should work. You require 122 * 2 bytes = 244 bytes to hold your image.
Now you would ask how did I get this? Well the answer is that it is given is qb's help.
The following formula will give you number of bytes you will require to store the image:
Formula:
4+INT(((x2-x1+1)*(bits-per-pixel-per-plane)+7)/ 8 )*planes*((y2-y1)+1)
Values:
x2 = 20
y2 = 20
x1 = 1
y1 = 1
bits-per-pixel-per-plane = 1
planes = 4
Now since you are using an integer array, each element is capable of holding 2 bytes. Thus you would require only 122 elements to hold your image.
SCREEN 12
DIM SHARED icon%(122)
LINE (1,1)-(20,20), 7, bf
GET (1,1)-(20,20), icon%
I think if I remember correctly GET(0,0)... has a problem. You cant get at 0,0
My advice to you would be not to use screen 12 for coding GUIs but rather use Future Lib to create it.
It will give you more advanced control over your GUI and it extends QB's limits by using EMS/XMS memory and many more things
Visit my site and see the screen shots of DAM-OS. I think that should change your mind. 8)
And next time before asking a question try to find the answer yourself. Because I didnt know this answer off-hand. I just went to QB's help > GET(graphics statement) > Details
and got the answer. It took me only a fraction of a second! :-?