|
|
|
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. |
They Are 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. |
|
|
| 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. |
|
This demo shows you 4 workarounds to 4 annoying quirks of QDirTree. Quirk #1: It has no Handle. Quirk #2: The ToolTip (not the Hint) displays for a very, VERY long time. Quirk #3: The .Directory property returns all uppercase letters. Quirk #4: When you set the .InitialDir property... it doesn't expand it (if it has subfolders). Everything you need to fix any or all these quirks can be found within this demo. |
|
An "$Include" file that will display a list of files found in a folder, that meet a certain criteria. It displays the file names in a QListView (along with the file size, the file type, and the last modified date). Although it's looks like what you'd see in Windows Explorer®... it doesn't have all the functionality that Windows Explorer® has. AND... it's not as fast as Windows Explorer® (especially when viewing folders that contain a very large number of files). I VERY strongly suggest using the file mask property to reduce the number of files that'll need to be displayed. If you need a way to select a folder... use the $Include file right below here (QFolderTree). 2009/10/03 Update: It would seem FileRec.Date and FileRec.Time don't ALWAYS return correct values. So I used a few API functions to get them. 2010/01/01 Update: It would seem 2010 caused an extra digit to be added to the FileRec.FileTime. See comment as to how I fixed this problem. |
|
This "$Include" file is my alternative answer to a QDirTree (which has been noted as being a memory hog). It displays a QTreeView just like a QDirTree, but it does not have all the features that a QDirTree has. What it can do is... give you the name of a selected folder (or drive) and you can use that information as you see fit. The one feature that it does have that's just like a QDirTree is... setting the InitialDir property. A feature that QDirTree does not have, but QFolderTree does have is... the ability to set a property to allow (or disallow) viewing almost every kind of folder. In the future I may add some more features, but in the mean time... this will do the job that it was intended for. Be sure to read all the Comments in both the .inc file and the .rqb (the demo) file to get an understanding of how to use it OR modify it. I hope you like it and appreciate having a directory tree that's editable AND doesn't use up alot of memory. Updated: Made some revisions to fix a couple of, previously unforeseen scenario, errors. Updated: Eliminated the need for the $Resource icons! Updated: Hopefully eliminated any naming conflicts when used with another $Include file. |
|
An "$Include" file that will display the end-users Taskbar no matter what (even if they click the Maximize button). |
|
An "$Include" file that allows the end-user to select a specific line number to goto within a QRichEdit. Newly updated to allow the end-user to manually type in a line number and simply press the "Enter" key. |
|
An "$Include" file that allows the end-user to optionally view line numbering for a QRichEdit. To effectively use Line Numbering in your program... you'll want to modify the ".bas" file (see Usage Demo) to suit your needs (since it already contains all the necessary code for Line Numbering). |
|
This example shows you how Columns work within a QListBox. Please read the comments to see how you can change the appearance. To force the showing of the horizontal scrollbar (if need be) for string items wider than the viewable window... refer to the message Alain (aka midiprog2000) posted April 18th, 2008. |
|
This demo shows you how auto-adjust the "Item" column width, within a QListView, to display a string that might be any length. The same idea used to auto-adjust the "Item" column... can be used auto-adjust the "SubItem" column widths, if need be. |
|
An example of how to create a menu that calls individual subroutines for each and every menu item. An example of how to create that same menu... but calls only a particular subroutine that will then select which menu item called it. |
|
I really don't remember what got me started on this but... I discovered that you can minimize (and then restore) a QPanel. I have no idea if this will be of any use to anyone. But at least, now, you know it can be done. |
|
This demonstrates how to make use of the Single Undo/Redo feature within your QRichEdit. |
|
An "$Include" file that allows the end-user to find text within a QRichEdit. Find is done from top to bottom only. Looks and acts... just like it does in WordPad®. Newly updated to allow the end-user to type in text and then simply press the "Enter" key. I've also fixed the CPU usage problem, when the form was being displayed. The Usage Demo (below) has also been updated to allow end-users to use ShortCut keys. |
|
An "$Include" file that allows the end-user to replace text within a QRichEdit. Find and/or Replace are done from top to bottom only. Looks and acts... just as it does in WordPad®. Newly updated to allow the end-user to type in text and then simply press the "Enter" key. I've also fixed the CPU usage problem, when the form was being displayed. The Usage Demo (below) has also been updated to allow end-users to use ShortCut keys. |
|
An example of how to right-align your data in a QStringGrid. Unfortunately QStringGrid doesn't have an Alignment property. So this is a workaround that I created to handle it. |
|
An example of how to clear your data in a QStringGrid in the (currently) fastest known way. |
|
An example of how to read from and write to a CSV (Comma Separated Value) file with a QStringGrid. You can change the source code to make use of a TAB file by changing the Separator property from "," to CHR$(9). Column widths are automatically adjusted when a file is loaded. The formula I use to adjust the widths is not exact, but it works. :) |
|
An example of how to check if the data in a QStringGrid has been modified. |
|
An example of how to sort a QStringGrid. If you were to add a dialog box and modify the code some... you can let the end-user select more than one column to sort by. |
|
Yet another game that I created. This one's a bit more challenging. *evil chuckle* Make sure you have all 4 of the files below in the same folder as the "executable". In other words... if you move the executable from the folder that you compiled it in... move the 4 files with it. After you've got it running... click the Help button to learn more about it. |
|
This example shows you how to use VBScript (from within RapidQ) to greatly reduce a time consuming equation. I read somehwere online that VBScript was "fast" at calculating numbers. So I tested it and sure enough... it is fast! Be sure to read the comments. |
|
This example shows you how to run a VBScript from within RapidQ (here I demonstrate the VBScript RegExp object). You can create a VBScript while the program is running and then execute it. Be sure to read the comments. |
|
This example shows you that RapidQ can display images embedded within a RTF file. I opted to put all the include files and the demo source code into a .zip file to make it easier to download. There's a .rtf file (that contains an image) within the .zip file (for demo purposes). If it wasn't for coding from Jacques... this would not have been possible. Update: You can now also load a .bmp file or paste a bitmap (that's on the Clipboard) into a QRichEdit (and optionally resize it after it's embedded). I added a .bmp file to the .zip file (also for demo purposes). Also... an extra feature I added was the ability to set the alignment of selected data (or... just the line the cursor is on). |
|
If you need to generate a "list" of random numbers (with no duplicates) fast... use a QStringList. Read the comments to see why it's faster than generating a list with a numeric array. Update: I found a way to generate the random number list even faster than before! Read the comments to see why it's super fast now. |
|
This is an example of a game that I wrote (when I first started using RapidQ). It's a very simple game and the coding is not well written. One feature that might be of interest is that... it's always on top of other applications. This is done with the SetWindowPos API function (you'll also find this feature in the RapidQ2.inc). |
|
This utility can be used to view image files and then save them in a different format. Image formats that can be viewed: *.BMP;*.DIB;*.RLE, *.JPG;*.JPEG;*.JPE;*.JFIF, *.GIF, *.EMF, *.WMF, *.TIF;*.TIFF, *.PNG, and *.ICO. Image formats that can be saved: *.BMP;*.DIB;*.RLE, *.JPG;*.JPEG;*.JPE;*.JFIF, *.GIF, *.TIF;*.TIFF, and *.PNG There's no need for the NVIEWLIB.DLL or JPEG.DLL anymore (if your operating system is pre-WinXP... download the gdiplus_dll.zip file below). If you're ambitious... you could use this code to create a full-blown image editor (I'd suggest using the .zip file below to assist you in developing just such a program). This .zip file contains extensive GdiPlus code written in VB6. This .zip file contains the gdiplus.dll for users who's OS is pre-WinXP. |
|
Remember the media player that Windows® had in Win98® (I think it was version 4.10)? Well this is my version of that same player written in RapidQ. |
|
I finally got around to creating a more fancy player BUT... it only plays WAVE (.wav) files! Why? Because this player displays volume peak meters. :) I haven't figured out how to display volume peak meters for MP3s (yet). The updates are listed at the bottom of the commented header. Check it out and let me know what you think or how it can be improved. |
|
I managed to get a couple of the basic SAPI functions to work without having to delve into writing any OLE IDispatch code. You can have your computer speak the text that's in a string (or read from a file), you can save spoken text to a wave file, and you can playback the saved wave file. Pay special attention to the warning in the save subroutine! There's options for changing the Rate, Pitch, and Volume. You can also change the Voice (if you have multiple voices installed). |
|
The Bouncing Ball demo (on RQ Demos 1 page) got me wondering if it could be used in other ways. So... I combined it and the ShapeForm method into a pretty cool program. Please read the comments to see what's been revised. Thanks go out to Andrew for the inspiration. |
|
An example of an extremely simple music player. It's capable of playing ".wav", ".mp3", ".mid" files (and possibly others). As I said... it's an extremely simple example. You'll need to replace the components on the form to have a fancy music player. Note: The Pause and Resume buttons are disabled for ".mid" files because they do not work as expected for this type of file. |
|
An example of how to add HighLighting and Line Numbering to your program that'll only use a "single" QRichEdit. This ".zip" file contains the following:
|
|
A tool for viewing an EMF image within either... a .SPL file... or a stand-alone .EMF file. This was created as part of a project that Terry (in the RapidQ group) requested. You can save the EMF as either a BMP or an EMF (to create a backup copy), if you'd like. The undesirable side-effect when saving as a BMP has been greatly reduced. Read the comments to find out more about it. This .zip file contains a NEW single .emf file for testing. (the old one had invalid bytes). |
|
An example of how to minimize your application to the System Tray instead of the Taskbar. An icon will appear in the System Tray that represents your application. You can add a PopUp menu to the icon (if you need one). The main purpose of this demo is solve a problem with closing the PopUp menu (if you decide not to make a selection from it). |
|
This is an example of how to add an icon to each tab within a QTabControl. I've only tested it using a typical TabControl. What got me started on this was... a coding problem dnoyon had when he created a TabControl using CreateWindowEx. So... I'd like to thank dnoyon for making this all possible. Updated to fix a flaw with components disappearing. Thanks go out to Keith for informing me about it AND the way to fix it. |
|
Another game I wrote with no special graphics needed. Be sure to read the header comments before you play (just so you don't get annoyed while playing it. LOL). |
|
An example of how to cancel the downloading of an internet file, that's started in a separate thread, using a timer. |
|
An example of how to toggle the Caps Lock, Scroll Lock, and Num Lock states. The keyboard lights will reflect the changes to the state of the locks. As an added bonus I've updated this to include the state of the Insert key. I tried GetKeyboardState and SetKeyboardState but I had better luck simply using GetKeyState. |
|
The .zip file contains a DLL, I created using FreeBasic, that will generate a tone based on the 3 parameters you pass to it. The first parameter is for the frequency (data type: single), the second parameter is for the duration (data type: long), and the third parameter is for the volume (data type: long). This DLL replaces the QTone include file that I created awhile back. I hate to say it but... RapidQ just wasn't fast enough for generating the necessary data. The Usage Demos (below) shows you how simple it is to use. |
|
This example ONLY works on Operating Systems: Win2000 or higher!!! I finally got working code to make either...
|
|
An example of how to paste Formatted Text (aka RTF) into a QRichEdit that's setup for PlainText. Update: Due to incorrect data being pasted from using a Menu option to paste I altered the code some. NEW Update: Paul L. has provided a MUCH simpler way of doing it and as an added benefit... the Formatted text that's on the ClipBoard is retained for use in another application. |
|
If you enjoy the "Scramble" type word games... you may find this application useful when you're totally clueless as to what the unscrambled word is. There's a tiny delay during startup (due to sorting). The time it takes to scan for possible valid words is also faster now. The word list file below is a newer one so be sure to download it too. |
|
An example of how to determine the end-users Operating System and some various information about that operating system. It may or may not work with every operating system (I could only verify it with Win98 SE and WinXP). |
|
I wrote this program for use while editing either... RapidQ source code or HTML source code. It'll help you determine the... RGB, Decimal, Hex, or HTML values for use with either the text or background colors. |
|
This is a modified version of the original wnd.bas written by William Yu. This version now works in both Win98 AND WinXP. A special thanks goes out to Danny for the solution to getting it to work under Win98. |