Table of Contents
Code Snippets
Here you’ll find free code written with either Visual Basic 6, ANSI C or Java. Feel free to use the code in your programs with or without acknowledgement. It’d be nice if you could let me know if you find something particularly useful, especially if you do use it in another program.
If you have any problems with any of the code below please contact me and I’ll try to help, time allowing.
C
Code written in ANSI C.
- SVGAlib colour swatches - A program to display swatches of the 16 standard colours SVGAlib uses.
ActiveX Controls (OCX)
Written in Visual Basic, for use with programs that support ActiveX OCX controls (such as Visual Basic).
- Progress Bar 3D - A 3D version of the standard Windows (Common Controls) ProgressBar control.
VB Functions
A collection of functions made for use with Visual Basic 6.
- IsLeapYear() - A function that checks whether a given year is a leap year or not.
- GetURLInfo() - A function that expands a URL into its component parts (hostname, port, file, protocol etc).
- RichTextbox Background Colours - Set the background colour of a RichTextBox in the same way you’d set the foreground colour through two easy to use functions. Demo project source and compiled executable available.
- Reverse DNS - A Visual Basic module and example project showing how to perform reverse DNS lookups with the Winsock APIs.
Java
Code written in Java.
- Java Utility Archive (version: rel-0.1) -
DavidCannings.jar, needed to compile some Java programs from this site.