Welcome to Louis Coder's Code Section

Welcome. On this page I serve code snippets, user controls, (class-) modules and forms that can be freely used (as long as the original copyright is retained). Most functions were created as a small extra project and have then been implemented into a larger project. Therefore the interfaces are clearly defined, what makes binding the code easy. BTW, GF stands for 'General Functionality', that's how I call these small code pieces. If you have any comments, questions or want to report a bug then feel free to mail louis@louis-coder.com!

Visual Basic 5.0/6.0*)


FreeInstall is a free installation software. You can copy files and Registry keys to a target machine. Furthermore FreeInstall can create desktop short cuts and Windows start menu entries. Source code partially included. Toricxs, the MP3/WMA/WAV Renamer, uses FreeInstall, for example. Click here to go to the FreeInstall main page (including detailed instructions).

Animation Control

VB and VC Code to play short avi clips on any VB form. The avi animation control is furthermore hidable and movable. Includes VC++ code that creates an AnimationCtrl object.

Dijkstra's Algorithm

An implementation of the Dijkstra algorithmus to find the shortest path between two nodes (if existing) in any graph. Contains also test code that demontrates the usage of Dijkstracls.


Kind of a cool progress bar. Best used to display drive reading/writing progress. The progress bar is painted in multiple colors, a legend shows the user what color belongs to which drive. This progress bar was first implemented in Toricxs (www.toricxs.com).


Collection of compression functions. Implements the run length encoding, Huffman and ZLib compression. Furthermore you can create a 'compression pack', i.e. a file that contains several compressed files that can be unpacked again using GFCompression. Please don't forget to disable all error checks and array boundary checking when compiling the project (enormous speed increase). (ZLib (c) by Jean-loup Gailly & Mark Adler.)


Function to create a whole directory structure. Usually you can only create one sub dir on the next lower level using MkDir, but the GFCreateDirectory() function uses recursion to make several (sub-) directories at once.


Creates and intialises an up/down control.


Shows how to use GetDIBits and SetDIBits. You can get the color lookup table data (color (x, y)) of any DC. Once you have the CLT data you can manipulate it and save it. That means, you can 'dissolve' any picture in a picture box, manipulate the color data and rewrite the picture.


Some kind of VB directory list box, but MUCH faster. The GFDirectoryList4 is a class and doesn't have any graphical interface. Just use the GFDirectoryList4 in situations you merely need all sub dirs of a given root directory, e.g. for searching purposes. As the GFDirectoryList4 has the same properties and functions as the VB DirListBox you can easily replace a slow DirListBox by a super fast GFDirectoryList4.


Enlarges a file using fast API functions instead of slow file data writing.


GFFastList is a user control that looks like a VB ListBox. The difference to the ListBox is the extreme fast loading of the FastList. It has functions to temporary disable redrawing, that's while the list can load 10,000 items in less than 2 seconds. Whenever you need to display a very large amount of data and a VB ListBox would be too slow then use the GFFastList. The only disadvantage of the FastList is the fact that it can't allocate mouse clicks (there's no support for any selection).


Mainly file functions. Includes GFFileAccess_GetDirFileSizeTotal() (VERY fast function to get the total size of all files in a given directory), GFFileAccess_GetFreeDiskSpace() and GFFileAccess_GetTotalDiskSpace().


Some kind of VB file list box, but MUCH faster. The GFFileListBox is a class and doesn't have any graphical interface. Just use the GFFileListBox in situations you merely need all file names of a given directory, e.g. for searching purposes. As the GFFileList has the same properties and functions as the VB FileListBox you can easily replace a slow FileListBox by a super fast GFFileList.


Determinates the type of any drive of the local computer (hd, RAM, cd rom, network etc.). Includes also code to get a drive's serial number.


Code to set up a global keyhook. A keyhook allows your program to receive ALL keystrokes, also those originally sent to any other program. Use the keyhook to implement Windows-wide hot keys, or to build a keylogger. As the keyhook cannot be set up using pure Visual Basic the project also includes a Visual C++ hook dll (code & final compiled dll).


Use the GFInfoTrailer to play 'cinema-like' making-ofs. You can make GFInfoTrailer scroll text, pictures and play sounds. The info trailer was first implemented in Toricxs (www.toricxs.com).


Shows how to set up an application-wide keyhook. In contrast to the global keyhook you don't need to use a VC hook dll. If you would like to set up a global keyhook then download and try out 'GFGlobalKeyHook'!


Shows how to add horizontal scroll bars to a VB ListBox. The scroll bars are automatically hidden if not required and re-shown if you add data to the ListBox that extends the box's x size.


Demonstrates how to play midi notes using the midiX API functions. (Cannot read or write *.mid files.)


The GFMouseGuide code allows you to make the mouse point to any control that has to get the user's attention. Especially for context help you can use the mouse guide code to show the user which control he's getting help on. Sample usage: Toricxs (www.toricxs.com)


GFMinimizedWindow() can move a VB form although it's minimized (VB would throw an error if you tried using Form.Move).


Code to read and write ID3v1 and ID3v2.3 tags. Includes all ID3v1 genre names.


A self-made MsgBox that supports any combination of buttons (not only vbOkOnly etc.). Furthermore you can use the code to create a password prompt (password letters displayed as '?') and a 'statistics box' with a monospaced font. Sample usage: Toricxs (www.toricxs.com).


This sample shows how to draw a picture to a picture box that's smaller than the picture itself. Scroll bars are used and this sample demonstrates how to initialise those scroll bars correctly.


Plays any (short) wave file.


Shows how make your program drag & drop-able. Using the functionality of the GFReceiveFile code you can make your program receive files and directories by the Windows Explorer (via drag & drop).


Code to register/deregister any file type. If you register e.g. '*.blah' together with 'Blah File' then any *.blah file will be listed as 'Blah File' in the Windows Explorer.


Sets up a shell hook. A shell hook can be seen as some kind of key hook which doesn't receive key strokes but Windows Shell events, e.g. if a file deletion using the Explorer or any pop up menu of the task bar.


Shrinks a file without re-writing it.


Collection of system metrics constants and API functions. You can request e.g. scroll bar thickness, default desktop icon sizes and so on.


Adds a program icon to the task bar and handles events sent to the task bar icon.


Get size and position information about the task bar using GFTaskBarInfo. Once you have the task bar position and size you can make your program's main window fill the whole desktop area without hiding the task bar. If the task bar's moved, the window is relocated and -sized, too.


Code to make windows being sticky to a master window. This effect is well known from Winamp, and is also implemented in Toricxs (www.toricxs.com). The code is easy to use, just give the GFWindowStick system a reference to the participated windows and the rest works on its own.


Accesses the CPU's performance counter (386 +) to make a program wait e.g. 100 Ás or to log a function's executing time that's below 1 ms (where Timer or GetTickCount() would fail because of too few time resolution).


Demonstrates how to create Visual Basic plug-ins. The sample project consists of a main program that loads the also included dll dynamically during run-time.


Records sounds from the microphone and stores the wave data in an array of Integers. The wave-array then can be edited or saved to file (no original *.wav file format). The sample also shows how to replay the wave array (sorry, still beta state).


SDRC means 'small direct remote control'. The remote control was once included within Noname 99. You can use the remote control to set up a TCP/IP connection to any computer you know the current IP address (via network or Internet). Then you can upload, download, delete and execute any file on the target machine.

Visual C++ 5.0/6.0


A keylogger implemented in VC++. Beta version (there may be some errors in it, for example it is loaded several times). PLEASE NOTE: save & close all running applications, the keylogger may crash Windows (especially Win98/ME).

Linux C

Linux Beginner's Bundle

Here I sell my university exercises for a mere song. But they are useful! The 6 included tasks demonstrate the usage of the following UNIX commands: qsort(), opendir(3), readdir(3), stat(2), lstat(2), readlink(2), getpwuid(3), getgrgid(3) fork(2), exec(2), wait(2), sigaction(2), kill(2), times(2), time(2), localtime(3), strftime(3), socket(2), bind(2), listen(2), accept(2), sleep(3), gethostbyname(3), connect(2) and select(3C). To compile the programs just type 'make' in the program's src directory.

*) if you get an error 'Retained is an invalid key' then open the .vbp file with Notepad and delete the 'Retained=x' line.