Helper Routines
Updated Monday December 26, 2011
   
Category
Topic
Arrays
vb6
vb5
vb4-32
Pure VB: Determine if an Array has been Dimensioned
Wrapper routine that returns True if an array has already been allocated using Dim or ReDim. June 3.1999

CopyMemory: Determining Array Initialization State and Dimensions
Routine that returns the number of dimensions in the passed array. July 29.1999

Pure VB: Determine the Selected Button in a Option Button Control Array
Pass any option button control array, and receive the selected option button index. Dec 7.2003



Controls
vb6
vb5
vb4-32
Pure VB: Centre a Label Within a Container
Tiny routine to vertically and horizontally centre a Multiline label within a form or container control. Feb 12.2000

Pure VB: Determine if a Control is a Member of a Control Array
... and without requiring any error trapping!  Jan 15.2003

StrPtr: Differentiate Between Cancel, OK and No Value in an InputBox
Newbie alert!  Newbie alert!. Aug 15.2002



Date/Time
vb6
vb5
vb4-32
Pure VB: Methods to Determine the Last Day of the Month
Contributors provide a variety of methods to determine the last date of a month. Mar 23.2002

Pure VB: Methods to Determine Number of Days in a Month
Contributors provide a variety of methods to determine number of days is a specified month. Mar 23.2002

Pure VB: Determining Leap Years
Just like the title says! Mar 23.2002

Pure VB: Fill a Combo with Specified Time Intervals
How to fill combos with a day of specific time intervals  Jan 14.2003

GetLocaleInfo: Get the System's Long Date Format
Quick method to retrieve just the current long date format.  Sept 25.2000

GetLocaleInfo: Get the System's Short Date Format
Quick method to retrieve just the current short date format.  Sept 25.2000

VarMonthName: Retrieve Localized Month Names
Handy method to generate a list of months specific to the locale  Oct 1.2001

VarWeekdayName: Retrieve Localized Weekday Names
Handy method to generate a list of weekdays specific to the locale  Oct 1.2001



Environment
vb6
vb5
vb4-32
Pure VB: Determine if App is Running in the IDE
Matt Curland's method to determine if a VB6 application is running in the IDE. Mar 23.2001


Files
vb6
vb5
vb4-32
StrFormatByteSize: Convert Numbers to Strings Expressed as Size Values
Pass numeric value, return string representing size in bytes, kb, mb or gb.  Mar 3.
2003


Fonts
vb6
vb5
vb4-32
CreateScalableFontResource: Friendly TrueType Font File Name
Cheat a bit and get the real name for any TrueType file on the disk.


Fractions
vb6
vb5
vb4-32
Pure VB: Converting Numbers to Fractions
Pass a value, get the value back as a fractional representation. Mar 24.2002


IDE
vb6
vb5
vb4-32
Pure VB: Determine if App is Running in the IDE
Matt Curland's method to determine if a VB6 application is running in the IDE. Mar 23.2001


OS and OS Features
vb6
vb5
vb4-32
GetVersionEx: Windows Version Info (Wrapper Routines) FREQUENTLY UPDATED!
A set of version wrapper functions that return True if the OS matches the desired type. Now identifies Win95-Win2003 Server, Longhorn Server, and Vista, as well as various Vista versions and software suites (e.g. BackOffice, Small Business Server etc.). Posted Aug 14.1999  Last updated Apr 15.2008

IsOs: Windows OS and OS Features Info
Determining specific Windows OS versions and OS features without using GetVersionEx Aug 20.2008



Numbers
vb6
vb5
vb4-32
Pure VB: Converting Numbers to Fractions
Pass a value, get the value back as a fractional representation. Mar 24.2002

Pure VB: Converting Numbers to Roman Numerals (and Back)
How to convert Arabic values to Roman Numeral representation, and back. Mar 23, 2002

Pure VB: Generating a Random Array of Unique Numbers
Routine to randomize an array of unique numbers of any size. Oct 18.1999

Pure VB: Preventing Duplicates in a Random Number Array
Routine to create a random array of unique numbers of any size. Jan 30.2006

Pure VB: Handy Functions for Working with Numbers
A handy numeric functions to assist in your app. Apr 12.2000  Updated Feb 16.2003

Pure VB: Handy Macros to Convert Numeric Data Types
Wrappers to convert between various numeric data types. Updated Nov 28.1999

CopyMemory: Handy Macros to Convert Between Signed and Unsigned Integers
Convert between signed and unsigned Words (Integers)  Mar 3.
2003

Pure VB: Determine the Number of Digits in a Number
A one-line routine that returns the number of digits in a passed numeric value. Oct 3.1999

Pure VB: Implementing a Number-To-Text Conversion Function
Writing a cheque-book application? Here's a multi-option number-to-text routine. Aug 20.1999



Strings
vb6
vb5
vb4-32
Pure VB: Converting Numbers to Roman Numerals (and Back)
How to convert Arabic values to Roman Numeral representation, and back. Mar 23.2002

Pure VB: Implementing a Number-To-Text Conversion Function
A multi-option number-to-text routine. August 20, 1999



Temperature
vb6
vb5
vb4-32
Pure VB: Temperature Conversion Routines
Project to calculate Celsius, Fahrenheit and Kelvin temperatures from entered values. Mar 24.2002


User-Defined Types (UDT)
vb6
vb5
vb4-32
CopyMemory: How to Copy a Private UDT Between Forms
Demo showing how to pass a UDT to methods that normally can't receive a UDT as a parameter. Jun 7.2001


Version Info
vb6
vb5
vb4-32
GetVersionEx: Windows Version Info (Wrapper Routines) FREQUENTLY UPDATED!
A set of version wrapper functions that return True if the OS matches the desired type. Now identifies Win95-Win2003 Server, Longhorn Server, and Vista, as well as various Vista versions and software suites (e.g. BackOffice, Small Business Server etc.). Posted Aug 14.1999  Last updated Apr 15.2008

GetFileVersionInfo: Handy Routines for Identifying Shell32 Versions
A function that returns True if the Shell32.dll version is equal to or later than the desired type. Jan 14.2003

IsOs: Windows OS and OS Features Info
Determining specific Windows OS versions and OS features without using GetVersionEx. Aug 20.2008



Windows & Forms
vb6
vb5
vb4-32
SetWindowPos: How to Create a 'Splash Screen' in Visual Basic
Adding and calling a start-up splash screen that does double duty as an about screen. July 30.1999

SetWindowPlacement: Restore and Activate a Window via its hWnd
Use the APIs to restore any window on-screen. July 17.1999

ClipCursor: Restrict the Mouse to a Form's Client Area
How to prevent the cursor from moving outside the form's client area. Feb 12.2000



 

 
 

PayPal Link
Make payments with PayPal - it's fast, free and secure!

 
 
 
 

Copyright ©1996-2011 VBnet and Randy Birch. All Rights Reserved.
Terms of Use  |  Your Privacy

 

Hit Counter