List, Collection and Arrays


A Simple Pair Class: This class implements a simple Value/Name pair relationship.

A To-Do Task Manager with Drag and Drop Capabilities: Always see your ‘to do’ tasks in priority order. Drag ‘n drop the important ones to the top of the list.

Binclass-a simple array structure for collecting numeric data: The Bin Class is a simple array structure for dispersing numeric data. I created the Bin Class for use in a timesheet program.

Bubble Sort For Numeric Data: The idea behind the bubble sort algorithm is to scan through a list of items until finding two adjacent items that are out of order, and then switching those items and continuing.

Bubble and Shell Sort Demo: The attached zip contains code that opens a text file, summarizes the data and demonstrates the bubble or shell sort methods to sort the data array..

Collection Class Derived From VB’s Collection Object: This class enables use the Implements keyword to create real object orientated collections.

Determine if a Value Exists in an Array without Looping: This function is very handy for checking whether a value exists in an Array.

Dictionary class: This .dll implements a Dictionary object. It is based on VB Collection and the included user-defined pair class.

Dictionary-Tree Class-Stores Data in a Tree-Like Structure: This collection class allows you to store data in a tree-like fashion, such as:.

Dynamic Integer Array Class: This array wrapper class enhances the functionality of an integer array in a number of ways.

Dynamic array class for Strings:This is a dynamic array class (implemented for Strings but can be easily generalized for any other type of object) based on VB’s existing implementation of arrays.

Employees Collection Class Example: Demonstrates how to use Collections and implement Collection Classes.

Enhancment of the VB Collection Object: This class module is a good example of a user-defined collection class.

FIFO-LIFO Stacks in VB:This uses standard code for creating first in first out and last in first out stacks, ported to VB.

Generate an Array of Unique Random Numbers: This function will generate an ARRAY of TRULY random numbers.

Hive – Alternative to Collection and Dictionary:Better, Faster and more rich than Collection and Dictionary.

Merge Sort and Bubble Sort For String Data: There is an extensive description in the code for what a merge sort is.

Most Recently Used Items Class: This code mainaines the list of most recently used items in your application. Items could be i.e. last opened files (paths+filenames).

Non-Repeating Random Numbers or Data using Arrays:This Code Shows how to:Use Arrays to help select nonrepeating random data.

Plot Numerical Data Arrays on a Graph: Plot.bas can be used to plot numerical data.

Print Custom Reports Using Custom Grid Array: The attached form shows how to: Display and print a report using custom grid array Right, Left and Center Align text in cells or columns .

Random Array Generator: Simple function for generating a random array of long integers. A simple application that uses the function is included.

Random Object-Data Generator: Though the technique used in this example as a random number generator the code with little modification can be used for a variety of purposes…

Search and Delete Elements from Arrays: This Demo shows an easy way to:Search for data and delete elements from a dynamic array.

Simple Function To Sort Standard Collections:I wrote this just now to sort a list that I’m using throwing into a menu.

Simplified Array Sorting: This very simple beginner level procedure provides a way of sortying an array, numeric, or alphanumeric.

Sort Module For Strings and Numbers: Usage is explained and and example is given within the comments.

Sort a Two-Dimensional Array on Any Element: This subroutine sorts one or two dimensional arrays.

Stack Class: A stack object implemented as an active x .dll, with methods such as AddToBottom, AddToTop.

Store Command Line Arguments in An Array: I often need to get and store command line arguments.

String Sort Routines-Quick, Merge, Selection, and Insert Sort: Generic string sort routines. I prefer to use the ‘non-pure’ Quick Sort unless you have a good reason to choose another routine.

The Array Login Method: Most login forms use databases or resource files.

Two-Dimensional Array Demo for Beginners: simple program that shows how a two-dimensional array works within a VB program.

Using a 3 Dimensional Array: Most multi-dimensional arrays that are used are two dimensional arrays eg. databases with records and fields, screen coordinates with X and Y and recordsets with rows and columns, but there are greater multi-dimensional arrays. There is very little documentation on these arrays.

Variable Lookup Record Class for Name-Value Pairs: This class Encapsulates a Collection to behave like a HashTable and Record. Included is a .bas module with functions that use the class to simplify copying ADO/DAO records to other records which have similar structures.

Leave a Reply