1) Most font programs are pretty simple, you use them soemthing like:
Font text$, x, y, col, FontFile$
(Some pre-load the fontfile so you dont have to specify it, and others read the font directly from BIOS memory)
2) When using GET and PUT (Or BSAVE., BLOAD) You need to specify 4 extra bytes in the array, for holding the dimensions of the bitmap.
Also, in screen 12, the memory used by the bitmap is higher then in screen 13.
Screen 13 is the most commonly used, and really is the best one, it's fast and has the most colors.
Look in the help, for GET and PUT, there's a section that reads (Copied from the qb helpfile):
Code: Select all
Usage Notes
_ The GET statement transfers a screen image into the array specified
by arrayname. The PUT statement, associated with GET, transfers the
image stored in the array onto the screen.
_ The following formula gives the required size of the array in bytes:
4+INT(((x2-x1+1)*(bits-per-pixel-per-plane)+7)/8)*planes*((y2-y1)+1)
The bits-per-pixel-per-plane and planes values depend on the
screen mode set by the SCREEN statement.
Bits-per-pixel-
Screen mode per-plane Planes
----------- --------------- ---------------------------
1 2 1
2 1 1
7 1 4
8 1 4
9 1 2 (if 64K of EGA memory)
1 4 (if > 64K of EGA memory)
10 1 2
11 1 1
12 1 4
13 8 1
_ The bytes per element of an array are as follows:
Two bytes for an integer array element.
Four bytes for a long-integer array element.
Four bytes for a single-precision array element.
Eight bytes for a double-precision array element.
Eight bytes for a currency array element.
For example, suppose you wanted to use the GET statement to store an
image in high resolution (SCREEN 2). If the coordinates of the upper-
left corner of the image are (0,0), and the coordinates of the lower-
right corner are (32,32), then the required size of the array is:
4 + INT((33 * 1 + 7)/8) * 1 * (33), or 169 bytes.
This means an integer array with 85 elements would be large enough
to hold the image.
_ Unless the array type is integer or long, the contents of an array
after a GET operation appear meaningless when inspected directly.
Examining or manipulating noninteger arrays that contain graphics
images can cause run-time errors.
_ GET and PUT statements operating on the same image should be
executed in matching screen modes. This can be either the same screen
mode or any screen modes with the same values for planes and bits-
per-pixel-per-plane.
_ One of the most useful things that can be done with GET and
PUT statements is animation. See help for the PUT statement for
information about how PUT arguments can be used to display a
stored image with special effects such as animation.
A bit hard to follow, but gies the formulae to calculate the number of BYTES required to store an image in any screenmode into an array.
If you use integer arrays you take the resulting number from the formulae and divide by two (as an integer holds two bytes)
3) TSR programs run under windows start in their own DOS environment, starting program A, and then program B, will start two different VM's (Virtual machines) and the two programs will not be able to communicate.
If ou want a TSR to be started alonside another program, you need to create a BAT-file, or start them from the CMD prompt.
I'm available on MSN, feel free to add me.