home *** CD-ROM | disk | FTP | other *** search
- QuickStart information using QuickWindows
- for Microsoft QuickBASIC 4.5
- (and other very important notices!)
-
- 1. Copy all the files to your \QB directory (or whatever dir QB.EXE is in).
-
- 2. To use QuickWindows inside the environment:
- Type QB /L QW.QLB
-
- Start all your programs with the following initialization commands:
- REM $DYNAMIC
- DEFINT a-z
- CALL QWINIT(4): CALL MINIT(s,b)
-
- 3. Try the small sample programs provided to get a feel for some of the
- library functions and notice the initialization.
-
- 4. To make an executable program using QuickWindows:
- a. Select "MAKE EXE File..." from RUN menu.
- b. Select Stand Alone .EXE file (QW has not been tested with BRUN)
- c. BASIC will compile your program and link it with the QuickWindows
- library (QW.LIB).
-
- -----------------------------------------------------------------------------
- 1. To use QuickWindows with other versions of BASIC, you'll need to make a
- QuickLibrary for that BASIC. If you are using BASIC 7.0, you'll need to
- remove a stub file (the stub file used in QB 3.x/4.x resolves
- external errors when the linker tries to find StringAddress and
- StringLength routines, which are called within BASIC 7.0 system).
-
- a. For QB 3.0, type BUILDLIB qw.obj+nobasic7,qw.exe,,;
-
- b. For QB 4.0, type LINK /q qw.obj+nobasic7,qw.qlb,,bqlb40;
-
- c. For BASIC 7.0, type LINK /q qw.obj,qw.qlb,,qbxqlb;
- Then remove the stub file from the .LIB file:
-
- LIB qw.lib [ENTER]
- Operations: -NOBASIC7.OBJ [ENTER]
- List File: [ENTER]
- Output File: [ENTER]
-
- 2. The method of passing arrays (integer or string) depends on the
- version of QuickBASIC you are using (the manual describes the procedure
- for Microsoft's QuickBASIC 4.x)...
-
- QuickBASIC version 3.x:
- All integer and string arrays must be passed with VARPTR reference.
- CALL GETSCRN(1, 1, 80, 24, VARPTR(array%(0)))
- CALL WOPEN(1, 1, 80, 24, 2, &H74, "", VARPTR(scrn%(0)), 1)
- CALL MENUSET(n, o, 2, &H04, &H0F, &H07, 255, VARPTR(menu$(0)))
-
- Format for QuickBASIC 4.x (as in the manual):
- All integer arrays must be passed without VARPTR.
- All string arrays must be passed with VARPTR.
- CALL GETSCRN(1, 1, 80, 24, array%())
- CALL WOPEN(1, 1, 80, 24, 2, &H74, "", scrn%(), 1)
- CALL MENUSET(n, o, 2, &H04, &H0F, &H07, 255, VARPTR(menu$(0)))
-
- Format for BASIC Professional Development System:
- All integer arrays must be passed without VARPTR.
- All string arrays must be passed with VARPTR.
- CALL GETSCRN(1, 1, 80, 24, array%())
- CALL WOPEN(1, 1, 80, 24, 2, &H74, "", scrn%(), 1)
- CALL MENUSET(n, o, 2, &H04, &H0F, &H07, 255, VARPTR(menu$(0)))
-
- 3. At the beginning of all your application programs, you must initialize
- QuickWindows with the following command:
-
- CALL QWINIT(5) 'Initializes for use with BASIC 7.0
- or
- CALL QWINIT(4) 'Initializes for use with QuickBASIC 4.x
- or
- CALL QWINIT(3) 'Initializes for use with QuickBASIC 3.0
-
- This sets up internal QW variables to be used with said version of
- QuickBASIC.
-
-
- 4. The bug discussed on page 7 of the manual has been corrected
- when using QuickWindows with QuickBASIC 4.0 and up. However, it still
- exists with QB 3.0.
-
- 5. QuickWindows supports 43-line text mode for EGA cards. Use BASIC's
- WIDTH command to set the number of lines. However,
- when using the mouse in 43-line mode, you must make the following call
- after initializing the mouse with MINIT:
-
- CALL MSETY(0,349)
-
- This allows the mouse cursor to move beyond the 25-line boundary. If a
- call is made to MINIT, the limit is reset to 25-lines.
-
- 6. BASIC has a tendency to move arrays around and as a result QuickWindows
- will lose track of the array that was used to store a portion of the
- screen (under a window). To help combat this problem, make all your
- arrays dynamic and DIM SHARED them in the main module. If you want to
- use them across multiple modules, make them COMMON SHARED by placing the
- COMMON SHARED statement in an include file and include it at the beginning
- of every module. You can tell if an array has moved if you see garbage
- on the screen when a window is closed or a menu goes away.
-
- Example:
- 'main module
- COMMON SHARED w1(),w2()
- DIM SHARED w1(3000),w2(2000) 'add other arrays after the window arrays
-
- 'other modules
- COMMON SHARED w1(),w2()
- 'do not do another DIM SHARED in other modules, only in the main.
-
- 7. Another important guideline is to make sure your arrays are DIM'd large
- enough to store that portion of the screen under a window (or menu).
- The calculation of array size is (y2 - y1 +1 ) * (x2 - x1 + 1),
- where (x1,y1) are upper-left coordinates of the area and (x2,y2) are
- lower-right coordinates. If the array size isn't big enough to handle the
- screen contents, then QuickWindows will clobber any memory after the
- said array, which could lead to program lockups or garbage appearing in
- your source code. Always be safe, save your source before running your
- program.
-
-
-