Page 1: RapidQ - Demos   { Updated: Jan. 30th, 2010 }
Below are links to demos (or examples if you prefer) of source codes that I wrote for use with RapidQ.    Some serve no real purpose other than... I hope they spark your imagination into creating something really useful.    If you have a request for a demo or maybe a problem with my source coding... please click the [Contact] button and send me an email.

Note: When you write your programs... it makes it alot easier for other people to read... if you replicate the structure of my source codes.    Start with Directives, then add your Declarations, then your Global Variables, then create your form and all it's components, and then finally add all your subroutines.

Another good coding practice is to use "Dim" for non-visible objects and "Create" for visible objects.    But if you need to create an array of visible components... you can not use "Create". You HAVE to use "Dim".    One other thing you should do is use the $Option Explicit directive (it'll help you to avoid most coding errors).

Also Note: Due to time constraints... many of the source codes below are not documented (commented).    I'll add comments to them when I get some free time.
The
Truth
Is Out
There.

Due to a Hard Drive failure back in December of 2006...
anything showing...    updated: 2006/12/13
indicates a backup copy.   The original date is unknown.
WARNING!
It's become apparent to me that occasionally someone takes MY source code and either... removes the Comment header (which I explicitly state that it must remain intact) and then posts it online on their website OR (after removing the Comment header) pawn it off online as their OWN source code. If I continue to find that my source codes are being stolen... I'll shut this website down faster than it takes to blink an eye.

[ Angled Labels ]    updated: 2006/12/13
(Change ".txt" to ".bas" before you save)

This simply shows how text can be displayed at different angles for a QLabel.    Angles "other than" 0, 90, 180, and 270 take up quite a bit of space.    If the label hides something on your form... try adding and setting the Transparent property to True.

[ Animated Icon Demo ]    updated: 2006/12/13
(Change ".txt" to ".bas" before you save)

I wrote this source code to demonstrate that your program's icon doesn't have to be static.    Probably the best use for it would be to... animate your icon during some operation that makes your program appear to be doing nothing, when actually it is doing something.

(You must save these .ico files in the same folder as the source code!)

[ Audio Volume Control ]    updated: 2006/12/13
(Change ".txt" to ".bas" before you save)

This demonstrates that the speaker volume can be adjusted from within your program.    I'd like to thank John Kelly for providing me with the correct calculation that's used within this program.    I need to enhance the source code (see comments) but it does work... as is.

(You must save this .mid file in the same folder as the source code!)

[ Audio Wave Recorder ]    updated: 2008/07/28
(Change ".txt" to ".bas" before you save)

This is a "very simple" demo of how to use MCI to record audio (through a microphone) and save it to a wave file (*.wav).    Requirements: A working microphone plugged into the proper port on your computer.

[ aviplay.bas ]    updated: 2007/02/17
(Change ".txt" to ".bas" before you save)

This is a modified version of the original aviplay.bas example found in the examples/graphics folder.    To know what modifications were made to this original... see comments I've added to the source code.

(You must save these .bmp files in the same folder as the source code!)

[ BitMap Panning ]    updated: 2008/02/10
(Change ".txt" to ".bas" before you save)

This examples shows you how to pan left (or right) a rather wide .bmp within the confines of a QCanvas.

(You must save this .bmp file in the same folder as the source code!)

[ BitMap Panning II ]    updated: 2008/08/13
(Change ".txt" to ".bas" before you save)

This is a revised version of BitMap_Panning.    This time I make use of a continuous bitmap that will give the end user the illusion of 360 degrees of viewing.

(You must save this .bmp file in the same folder as the source code!)

[ BitMap Scroller ]    updated: 2008/02/17
(Change ".txt" to ".bas" before you save)

This examples shows you how to scroll QBitMaps, that are continuously updated (when one of three is out of view).    Read the comments to see how it's done.

[ BorderIcon Help Button ]    updated: 2008/03/10
(Change ".txt" to ".bas" before you save)

This demonstrates how to make use of the BorderIcon Help Button.    Note: There's a drawback to having the Help button on your form.    Windows® requires that the Minimize and Maximize buttons be removed, if the Help button is displayed.    This is because the Help button was designed for use with Dialog boxes, not Forms.

[ Borderless Window Moving ]    updated: 2008/06/27
(Change ".txt" to ".bas" before you save)

This demonstrates how to move a Borderless Window.    Note: There's certain things that must be done in order for it to work.    Be sure to read the comments, in the subroutines, that are involved with moving a borderless window.

[ Bouncing Ball ]    updated: 2008/01/20
(Change ".txt" to ".bas" before you save)

This demonstrates how to make use of the QCanvas to draw a bouncing ball.    I found an example of this written in Visual Basic and ported it to RapidQ.    Be sure to read the comments.

[ ButtonColor OnHover QButton ]    updated: 2008/07/27
(Change ".txt" to ".bas" before you save)

This demonstrates how to change the color of a QButton (since the Color property doesn't seem to work).    It's not an easy thing to do but it can be done.    Be sure to read the comments because there are several factors that'll be need to take into account.    Resulting in adjustments that'll need to be made when you use this code in your application.    Note: Changing the color of a QOvalBtn is alot easier. Refer to RapidQ message...

[ Message: 33470 ]

[ CHM Auto Search ]    updated: 2010/01/30
(Change ".txt" to ".bas" before you save)

This demo shows you how you can perform an auto search of any CHM help file.    The search can be done for a single word or a conditional phrase (see comments).    The Search tab, of CHM help files, can be 1 of 2 different styles and included in this demo are the 2 different ways of handling either style.    As far as I know... this is the first/only demo on the internet of how to do a CHM auto search.

[ ComDlg Open SaveAs ]    updated: 2008/11/28
(Change ".txt" to ".bas" before you save)

This demo shows you how you can use the ComDlg32.dll to display the standard Windows® Open and SaveAs dialog boxes (which, to me, make your program look more professional).    Update: I just found out that JohnK already figured out how to use these common dialogs in an easy to use way.
See message... [ Re: Open/SaveAs Dialog ]

[ Delete Tab Demo ]    updated: 2006/12/13
(Change ".txt" to ".bas" before you save)

Old News: RapidQ's compiler (RC.exe) had a small flaw that made the DelTabs method inoperative for a QTabControl.    I needed the DelTabs method for my own IDE so... I created a workaround.    It made use of an API function call to delete a tab.    Since then... Snakedile has fixed the flaw in RC.exe with some re-engineering code.    You can find the re-engineering code in the RapidQ group messages archives.    Or you can find and download the already re-engineered version of RC.exe by clicking here... [ Paul's Website ]

New News: I finally figured out how to get DelTabs to work with either the original RC.exe or the latest re-engineered RC.exe! :)

[ DemoCoder ]    updated: 2006/12/13
(Change ".txt" to ".bas" before you save)

This demonstrates one way to encode a file (or a text string) and then decode it.    Note: Read and understand the disclaimer comment before you use it!

[ Desktop Icon ]    updated: 2009/05/22
(Change ".txt" to ".bas" before you save)

Have you every wanted to create a Desktop Icon when you're distributing your own RapidQ application(s)???    Well... here's the only way I've found that you can do it.    It requires passing parameters to a scripting file (.vbs).

(You must save this .vbs file in the same folder as the source code!)
[ Desktop Icon Script ]

[ Display Test ]    updated: 2008/04/22
(Change ".txt" to ".bas" before you save)

I wrote this to find out how Windows® handles the initial display of a program.    It serves no purposes other than to show you "the order" of the Form events that take place.    It might even help you, in some way, to solve a coding problem.

[ Drag & Drop ]    updated: 2009/10/18
(Change ".txt" to ".bas" before you save)

An example of how to Drag & Drop filenames from a QListBox... to commonly used RapidQ components.    The inspiration for creating this came from... a question haidel00 asked in a RapidQ group message.    Please Note: This Drag & Drop may, or may not, work on other applications (those not created by RapidQ).    Below is a .zip file containing 3 more source code files and 3 sample files.    The source code files are for showing you how to accept and process the information that's within a dropped item.    One source code is for a QCanvas (this one is so cool). Another is for a QListView (this one needs a better solution). And the third is for a QRichEdit (nothing fancy here).    The sample files are merely for demo purposes (just to make it easier for you to see that this really does work).    I would suggest downloading both the source code above and the .zip file below so that you can get a better understanding of what all is involved with Drag & Drop in RapidQ.    I commented all of them for good reason!    So take the time to "read" the comments.

Update: I found a solution that solves the problem of garbage being displayed when a QListView User-Defined WndProc is being used.    (the same code used to solve the problem... could be used for the QListBox or QTreeView problem as well)

[ drag_n_drop_demos.zip ]

A special version that allows dragging and dropping between two listboxes that are on one form.
[ Drag & Drop On 1 Form]    updated: 2009/11/14

[ DualForm ]    updated: 2006/12/13
(Change ".txt" to ".bas" before you save)

An example of how to create and display multiple forms.    Note: There are other ways of handling the display of multiple forms.    If you need help in that regards... just ask.

[ Find A Window ]    updated: 2006/12/13
(Change ".txt" to ".bas" before you save)

An example of how to find a program (if it has a window open and is running).    And then do something with it, if it's found.    Note: Be sure to read ALL the comments before using.

[ Flash Alert User ]    updated: 2008/07/04
(Change ".txt" to ".bas" before you save)

This demo shows you how you can Flash the TaskBar button (and/or the Form's Caption) to alert the user that something has completed (OR maybe something needs their attention).

[ Gradient Form Color ]    updated: 2009/01/21
(Change ".txt" to ".bas" before you save)

The purpose of this demo is to show you that you can make your form look more professional... by giving the form a gradient background color.    The form's background is created internally, so there's no need for an external BMP file.

[ Help With Help ]    updated: 2006/12/13
(Change ".txt" to ".bas" before you save)

A demo illustrating how to make use of a Help file in your program.    It provides ways to display 3 different kinds of Help files.    (.HLP or .HTML or .CHM).

[ Hint Demo ]    updated: 2008/06/18
(Change ".txt" to ".bas" before you save)

This demo was inspired by... Slavomir.    Instead of using a MessageDlg (or ShowMessage) to display an error message regarding invalid input... it uses the Hint bubble.    Read the comments within the Validate_Input subroutine to see how it works.    Note... there are other comments that might be helpful too.    Also note... this is both a Hint demo AND a Login demo.

[ Icon From DLL ]    updated: 2009/02/03
(Change ".txt" to ".bas" before you save)

This example was inspired by... Vic.    It demonstrates how to use custom icons for the MessageBoxIndirect API function.    Read the comments to see how it works.

[ LNK Reader ]    updated: 2009/01/23
(Change ".txt" to ".bas" before you save)

This demo reads the contents of a .lnk file and was inspired by... CarlT.    I couldn't get an example that he provided, within a group message, to work.    He was suggesting to use a QOpenDialog to get the file name, of a .lnk file, to read.    But I was getting results that didn't make any sense, until I figured out what was going on.    Read the comments within the header to see how I did get it to work without QOpenDialog.

[ MDI Emulation ]    updated: 2008/06/01
(Change ".txt" to ".bas" before you save)

The MDI portion of RapidQ was never completed.    This is the code I was able to get working that "emulates" MDI.    It is NOT a true MDI application.    It imitates one... as close as it can.    And doesn't use API to create the child windows.

[ MultiImage BMP And QImageList ]    updated: 2007/01/06
(Change ".txt" to ".bas" before you save)

I can not take full credit for this example.    It's based upon a suggestion from Paul L.    It's purpose is to show you how you can combine multiple images into "one long image" and then use the individual images simply by referencing an index into the QImageList.

(You must save this .bmp file in the same folder as the source code!)

[ Multiple RichEdit HighLighter ]    updated: 2009/06/11

An example of how to add HighLighting and Line Numbering to your program that'll use "multiple" QRichEdits.

This ".zip" file contains the following:
  1. "ReadMe_1st.txt" some brief descriptions and an installation suggestion.
  2. "Multiple_RichEdit_HighLighter.rqb" demonstrates the EditAide.dll.
  3. "EditAideEditor.inc" must be used in conjunction with the EditAide.dll
  4. "EditAide.dll" the DLL that can highlight and display line numbering
  5. "EditAide.ini" the defaults that the EditAide.dll will use
You don't necessarily need to use both features.    You can use either the highlighting feature or the line numbering feature (or both).    I know the Scilexer.dll is already capable of both of these features.    But this is my attempt at making those kinds of features easier to use (and adjust).    I may (or may not) attempt to add code folding someday.    If I do... I'm going to need some help from someone with figuring out what's the best way to do it.

[ Multi-Threading ]    updated: 2009/01/24
(Change ".txt" to ".bas" before you save)

I created this example to demonstrate a couple of different things about threads.    Such as... you can pass a "simple" parameter to a thread when it's started.    And that... threads can access "globally" declared variables.    Hopefully you can find some use for threads that will help improve your program.

[ ProgressBarClock API ]    updated: 2009/06/11
(Change ".txt" to ".bas" before you save)

This demonstrates how to create a Progress Bar Clock using the API function "CreateWindowEx".

[ ProgressBarClock RQ ]    updated: 2009/06/11
(Change ".txt" to ".bas" before you save)

This demonstrates how to create almost the exact same Progress Bar Clock using RapidQ.    The main difference is... you can't change the "Style" from a smooth fill bar to a block fill bar, using RapidQ.    Personally... I think the block fill bar looks much better. Updated: Gary (from the group) showed me how to make the RapidQ version... display much more accurately. Thanks Gary!