Rapid-Q Documentation by William Yu ©1999-2000 | Contents

# Contents

Preface
Chapter 1: Rapid-Q Overview

- 1.1 How slow is Rapid-Q anyway?
- 1.2 What about bloat-ware?
- 1.3 Does Rapid-Q require any extra runtime DLLs?
- 1.4 How much memory does Rapid-Q suck out of my programs?
- 1.5 How easy is it to hack into my programs?
- 1.6 Do I need a license to distribute my programs?

Chapter 2: Rapid-Q Fundamentals

- 2.1 Rapid-Q Environment
  - Required files and settings
- 2.2 Using the Rapid-Q IDE
- 2.3 Compiling and Running a Simple Application
- 2.4 Command line switches
- 2.5 General Structure of a Rapid-Q Program
- 2.6 How close to the BASIC language is Rapid-Q?

Chapter 3: Rapid-Q Language Guide

- 3.1 Rapid-Q Directives
  - $APPTYPE
  - $DEFINE and $UNDEF
  - $ESCAPECHARS
  - $IFDEF and $IFNDEF
  - $INCLUDE
  - $MACRO
  - $OPTIMIZE
  - $OPTION
  - $RESOURCE
  - $TYPECHECK
- 3.2 Variables and Assignments
  - Numeric types, string types
  - Numeric Range values
  - Proper assignment, and inconsistencies
- 3.3 Rapid-Q Components/Objects
- 3.4 Component Methods & Events
- 3.5 Rapid-Q Subroutines & Functions
  - Special conditions
  - Passing by value or reference
- 3.6 Rules of Scope

Chapter 4: Writing your first Rapid-Q Application

- 4.1 Deciding what to write
  - Simple database like program
  - Using QButton, QEdit, QForm, QLabel, and QListBox
- 4.2 Designing the form
- 4.3 Handling events
  - How to handle on click events
- 4.4 Source Code Listing

Chapter 5: Introduction to Forms

- 5.1 What's in a form?
- 5.2 Adding components to a form
- 5.3 Tracking mouse position on form
  - Introduction to MouseX and MouseY
- 5.4 Special Events for forms
  - OnResize, OnKeypress, OnKeydown
- 5.5 Dialog boxes
  - Use of ModalResult
- 5.6 Using the CREATE Method
- 5.7 Embedding CREATEs
- 5.8 Creating Menus

Chapter 6: Writing Console Applications

- 6.1 Overview of console functions
- 6.2 Hello world example
  - Writing/Copying to/from offscreen pages
- 6.3 Using PEEK and POKE
- 6.4 Accepting user input
- 6.5 Trapping extended keys
- 6.6 Mixing CONSOLE with GUI
- 6.7 Linux/Unix console

Chapter 7: Introduction to streams

- 7.1 File streams
  - Reading/Writing numbers and strings
- 7.2 Memory streams
  - Copying between streams
- 7.3 Saving/Loading UDTs and Arrays

Chapter 8: Using Image Resources

- 8.1 Supported Resources
- 8.2 Introduction to Image lists
  - More on Rapid-Q's image cache
- 8.3 Other kinds of Resources

Chapter 9: SUBI, FUNCTIONI, and DLLs

- 9.1 SUB/FUNCTIONs with variable parameters
- 9.2 More on FUNCTIONI
- 9.3 Introduction to DLLs
- 9.4 How to call a DLL
- 9.5 Using Quick View
- 9.6 Writing your own DLLs
- 9.7 Using unsupported types in DLL call
- 9.8 API conversion table

Chapter 10: Creating Custom Components

- 10.1 Introduction to object creation
- 10.2 Extending QCanvas
  - Adding new properties
  - Using Constructor
- 10.3 Adding/Overriding Methods
- 10.4 Defining Events
  - Inherting Events
- 10.5 Adding components to components
- 10.6 Extending empty components
- 10.7 Public/Private properties and methods
- 10.8 Templates and property sets
- 10.9 Creating custom events
- 10.10 QDiamondBox Source Code Listing

Chapter 11: Using Function Pointers

- 11.1 Introduction to the concept
- 11.2 Defining function pointers
- 11.3 Using function pointers properly
- 11.4 What's not supported in Rapid-Q

Chapter 12: Graphics under Windows

- 12.1 Graphics under DOS versus Windows
- 12.2 What components require painting
- 12.3 Drawing graphics dynamically
  - Using QBITMAP as the off-screen page
- 12.4 Ownerdraw List and Combo Boxes
  - Ownerdraw Variable vs. Fixed
- 12.5 Using DirectX

Chapter 13: Direct3D for Rapid-Q

- 13.1 Requirement specifications
  - Required or suggested files
- 13.2 Using Anim8or to create 3D models
- 13.3 Loading/Using .X files
- 13.4 Wrapping textures around an object
- 13.5 Rotate/Moving objects

Chapter 14: Programming in MySQL

- 14.1 Quick introduction
  - Required files
- 14.2 Connecting to MySQL
- 14.3 How to perform queries and obtain result
- 14.4 Interfacing QMYSQL with QSTRINGGRID
- 14.5 Storing and retrieving blobs
- 14.6 Using LOADBLOB and SAVEBLOB
- 14.7 In conclusion

Chapter 15: COM Programming

- 15.1 Supported COM extensions
  - COM clients (automation controllers)
  - Active Documents
  - How to register COM objects
- 15.2 About QOLEOBJECT
- 15.3 About QOLECONTAINER

Appendix A: Rapid-Q Component/Object Reference

- APPLICATION (Windows/Linux)
  - Properties, Methods Application examples
- CLIPBOARD
  - Properties, Methods ClipBoard examples
- PRINTER
  - Properties, Methods Printer examples
- QBITMAP
  - Properties, Methods QBitmap examples
- QBUTTON (Windows/Linux)
  - Properties, Methods, Events, QButton examples
- QCANVAS (Windows/Linux)
  - Properties, Methods, Events, QCanvas examples
- QCHECKBOX (Windows/Linux)
  - Properties, Events, QCheckbox examples
- QCOMBOBOX (Windows/Linux)
  - Properties, Methods, Events, QCombobox examples
- QCOMPORT
  - Properties, Methods, Events, QComPort examples
- QCOOLBTN (Windows/Linux)
  - Properties, Methods, Events, QCoolbtn examples
- QDIRTREE
  - Properties, Methods, Events, QDirTree examples
- QEDIT (Windows/Linux)
  - Properties, Events, QEdit examples
- QFILELISTBOX
  - Properties, Methods, Events, QFileListBox examples
- QFILESTREAM (Windows/Linux)
  - Properties, Methods, QFilestream examples
- QFONT (Windows/Linux)
  - Properties, Methods, QFont examples
- QFONTDIALOG
  - Properties, Methods, Events, QFontDialog examples
- QFORM (Windows/Linux)
  - Properties, Methods, Events, QForm examples
- QGAUGE
  - Properties, QGauge examples
- QGLASSFRAME
  - Properties QGlassFrame examples
- QGROUPBOX
  - Properties, Methods, Events, QGroupBox examples
- QHEADER
  - Properties, Methods, Events, QHeader examples
- QIMAGE
  - Properties, Methods, Events, QImage examples
- QIMAGELIST
  - Properties, Methods, QImageList examples
- QLABEL (Windows/Linux)
  - Properties, Events, QLabel examples
- QLISTBOX (Windows/Linux)
  - Properties, Methods, Events, QListbox examples
- QLISTVIEW
  - Properties, Methods, Events, QListView examples
- QMAINMENU (Windows/Linux)
  - Properties, Methods, QMainMenu examples
- QMEMORYSTREAM (Windows/Linux)
  - Properties, Methods, QMemorystream examples
- QMENUITEM (Windows/Linux)
  - Properties, Methods, Events, QMenuItem examples
- QMYSQL (Windows/Linux)
  - Properties, Methods, QMySQL examples
- QOPENDIALOG (Windows/Linux)
  - Properties, Methods, QOpenDialog examples
- QOLECONTAINER
  - Properties, Methods, QOleContainer examples
- QOLEOBJECT
  - Properties, Methods, QOleObject examples
- QOUTLINE
  - Properties, Methods, Events, QOutLine examples
- QOVALBTN (Windows/Linux)
  - Properties, Methods, Events, QOvalbtn examples
- QPANEL (Windows/Linux)
  - Properties, Events, QPanel examples
- QPOPUPMENU
  - Properties, Methods, QPopupMenu examples
- QRADIOBUTTON (Windows/Linux)
  - Properties, Events, QRadioButton examples
- QRECT
- QREGISTRY
  - Properties, Methods, QRegistry examples
- QRICHEDIT (Windows/Linux)
  - Properties, Methods, Events, QRichedit examples
- QSAVEDIALOG
  - Properties, Methods, QSaveDialog examples
- QSCROLLBAR (Windows/Linux)
  - Properties, Events, QScrollBar examples
- QSCROLLBOX
  - Properties, Methods, Events, QScrollBox examples
- QSOCKET (Windows/Linux)
  - Properties, Methods, QSocket examples
- QSPLITTER
  - Properties, Events, QSplitter examples
- QSTATUSBAR
  - Properties, Methods, Events, QTrackBar examples
- QSTRINGGRID
  - Properties, Methods, Events, QStringGrid examples
- QSTRINGLIST (Windows/Linux)
  - Properties, Methods, QStringList examples
- QTABCONTROL
  - Properties, Methods, Events, QTabControl examples
- QTIMER (Windows/Linux)
  - Properties, Events, QTimer examples
- QTRACKBAR
  - Properties, Methods, Events, QTrackBar examples
- QTREEVIEW
  - Properties, Methods, Events, QTreeView examples

Appendix B: Rapid-Q DirectX Component/Object Reference

- QDXIMAGELIST
  - Properties, Methods, Events, QDXImageList examples
- QDXSCREEN
  - Properties, Methods, Events, QDXScreen examples
- QDXSOUND
  - Properties, Methods QDXSound examples
- QDXTIMER
  - Properties, Methods, Events, QDXTimer examples

Rapid-Q Direct3D Component/Object Reference
This is a work in progress, some properties or methods may change in the future. All 3D operations are done in Retained mode.

- QD3DFace
  - Properties, Methods, QD3DFace examples
- QD3DFrame
  - Properties, Methods, QD3DFrame examples
- QD3DLight
  - Methods, QD3DLight examples
- QD3DMesh
  - Properties, Methods, QD3DMesh examples
- QD3DMeshBuilder
  - Methods, QD3DMeshBuilder examples
- QD3DTexture
  - Methods, QD3DTexture examples
- QD3DVector
  - Properties, QD3DVector examples
- QD3DVisual
  - Methods, QD3DVisual examples
- QD3DWrap
  - Methods, QD3DWrap examples

Appendix C: Rapid-Q Keywords & Statements

- Valid Operators (In order of precedence)
  - Exponentiation (^)
  - Multiplication/Division and Shifts (*, /, \ (integer division), SHL, SHR)
  - Modulo arithmetic (MOD, INV)
  - Addition and subtraction (+, -)
  - Relation operations (=, >, <, <>, <=, >=)
  - Logical operations in order from high to low (NOT, AND, OR, XOR)
- Rapid-Q internal definitions
  - WIN32, UNIX, TYPE
- Rapid-Q supported Data Types
  - BYTE, WORD, INTEGER, VARIANT, etc...
- Branching with GOTO and GOSUB
  - GOTO, GOSUB, RETURN
- User defined types
  - TYPE versus STRUCT
- Conditional statements
  - IF .. THEN .. ELSE, SELECT CASE
- Loops
  - FOR .. NEXT, DO .. LOOP, WHILE .. WEND
- Constructors/Methods
  - CONSTRUCTOR, CREATE, WITH
- Procedures
  - SUB, FUNCTION, SUBI, FUNCTIONI
- Internal Variables
  - Command$, CurDir$, MouseX, MouseY, etc...
- Console keywords, Detailed list
  - CLS, COLOR, PRINT, INKEY$, etc...
- Other reserved keywords, Detailed list
  - ABS, LEN, MID$, SWAP, etc...
- Touble Shooting
  - How to Debug your programs

| Next Chapter