Downloads – VB 6.0 Examples


Click Star to Rate this Page
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)

Click for the Microsoft Visual Basic.NET Resource SiteI still have a lot of downloads to add to this site.. I went ahead and made available the Visual Basic 6.0 examples I have added so far. Will continue to add more as time goes on. These are from my website which I’m trying to integrate to this site.

Address Book Database5.1 KiB907A basic example to show you how to create a database program as an address book. This address book example had a minor update that removed some dead code and set the Data Bar controls DatabaseName location to look for the .mdb database file in the project directory.
Audio Level26.4 KiB670This is an old download from msdn that shows the level of the audio playing with bars. This only works on some sound cards that has an Input/Output Peak Meter. Has a bas file with a lot of useful Winmm.dll APIs though. Its a self-extracting .exe file.
Autocomplete Capabilities for Combobox and Textbox Controls1.9 KiB681This uses the SHAutoComplete API to enable textbox and combobox controls to have autocomplete capabilities. As a little tip, If you've ever tried to autocomplete comboboxes before and it wouldn't work, its because you need to get the handle to the actual "Edit" window of the control. This example shows how to do that and uses the FindWindowEx API call to get the handle to the combobox edit portion.
Calculator Program Example2.0 KiB695This is an example to show how to make a basic Calculator program in VB 6.0. It has the basic Addition, Subtraction, Division, and Multiplication features. Also shows how useful control arrays can be for certain instances,.
CD Class Module with Program5.0 KiB519This is a project that shows how to make a full cd player using a CD Module I have available. The module is already included in this download. Uses the MCISendString Windows API and no 3rd party controls. Has all of the typical .cda CDRom playback features. Will open and close the cd player door or tray as well.
Change All Same-type Controls Settings/Properties on Form1.6 KiB588This shows how to change settings or properties for controls of the same type without having to write code for each individual control. Ex: Say you have 5 textbox controls and you want them all to be cleared. Instead of creating code for each control use some simple For/Each code to automatically go through all textbox controls on the Form and clear the textbox controls text. This example will Clear All Textbox control's Text and to Checkmark all Checkbox controls on the form.
Change and Set Custom Shaped Forms2.2 KiB607A project showing how to use the SetWindowRgn, CreateEllipticRgn, CreateRoundRectRgn, CreateRectRgn, and CreatePolygonRgn - API Calls to change the Forms shape. This particular example shows how to create a Round, Rectangle, and Elliptic Shaped Form in the application.
Change Windows Desktop Wallpaper2.2 KiB573An example of how to programmatically change the Windows desktop background wallpaper picture. Uses the SystemParametersInfo Api to do this.
Check if a File and Folder/Directory Exists or Not1.6 KiB600This uses the Dir function and the FileSystemObject located in the Windows Script Host Object Model. The code will throw a messagebox with either a true or false message depending on whether specified folder or file path exists or not.
Chr$ Code Converter1.4 KiB530This is the source code to make a Chr$ code converter. Convert strings into Chr$ code.
Complete MP3 Player Example28.5 KiB786This is source code to a media player made quite along time ago. Uses the Windows Media Player control. Should be able to play most music files like mp3 and wave. Not sure how well this would work no days with the newer wmp .ocx
CPU RDTSC/Calculate CPU ClockSpeed in Realtime20.2 KiB525This is a project that returns the processors timestamp tick value and also calculates the speed of the processor in real-time. The dll is included in this download. It uses my csRDTSC.DLL C++ Dll.
CPU Usage using GetSystemTimes API2.7 KiB545A small example of how to get the computers total cpu usage. This project uses the GetSystemTimes API call and performs calculations to get the total system cpu or processor usage. This API can only get the total cpu usage from ALL of the computers processors and cores. Example, if CPU #1 is 100% usage and CPU #2 is 0% usage the total usage would be 50%. Also, this API call is available in Windows XP Service Pack 1 or Above. Obviously Vista, Windows 7, 8.0, 8.1, and newer will have it.
Create Controls at Runtime1.2 KiB529Shows how to create controls at runtime. This example makes a label and command button control when the form loads.
csSoundPlayer Library v1.1 App5.0 KiB530This is a example of how to use the csSoundPlayer Library v1.1 Class in your projects. This Class makes it very easy to add support for playing Waveform (.wav) sound files.
Downloading Files from Internet1.8 KiB633Shows a couple very easy ways to download files from the internet using the provided url. Uses api, no controls. You can download files, webpages etc... Uses the DoFileDownload and URLDownloadToFile api calls.
Downloading via .NET COM Wrapper26.4 KiB485An example of how to use a COMClass made with VB 2005 to give VB 6.0 simple download capabilites by Interoperating (Fusion) with the .NET Framework. The 2005 project and VB 5.0/6.0 Example of using the wrapper is included with the download. You may need to compile the VB 2005 project to register the control as a COM object and then add a reference to its TLB file or Register the TLB File in the Registry.
Drag and Drop with Listboxes22.5 KiB589Shows a way you can fake a drag/drop with listbox controls. It does not use the official Drag/Drop features of VB. You can select and drag an item in one listbox to another.
Drawing onto a Picturebox with a Mouse2.4 KiB514This example shows how to draw using the mouse onto a picturebox control.
Environment Variables - Hardware/System Information3.0 KiB543This project uses the GetEnvironmentVariable API to lookup pre-defined variables and get/retrieve their values. This downloads gets Windows and Hardware information. To view some available environment variables in Windows XP you can go to Start / Settings / Control Panel and then click on the System icon under the Control Panel. Click on the Advanced tab and click the Environment Variables button which will display a window with the variables and their values.
FX.DLL with SDK - Version 1.03252.7 KiB639The FX technology offers you fast, powerful and safe Graphical Device Interface (GDI) based solutions. The FX library is written in Microsoft Visual C++ 6.0 and is designed for the Win32 subsystem. The FX library supports all Windows platforms (as of 2003).
Get and Save Settings1.6 KiB519Shows you how to use the GetSetting and SaveSetting functions in VB 6.0. The settings are saved in the Windows Registry
Get Low-Level Memory Performance Info2.2 KiB509A small example of using the GetPerformanceInfo API Function with PERFORMANCE_INFORMATION I converted from C++ to VB to get some low-level information about the computers memory and kernel based data. Gives you the Total/Available Physical Memory (Ram), Handle Count, Thread Count, Processes, Kernel Related Memory Data, Commit Charges, System Cache, Paging size, and more.
Get the Last Time the User was Active1.8 KiB560This uses the GetLastInputInfo API call, that returns the current tickcount value of when the user was last active. This example monitors the tickcount value and if the value has changed since the last check, it will display the actual Time of Day the user was last interacting in Windows. This API mainly checks for Mouse and Keyboard or Touchscreen activity.
Hide or Show Caret/Cursor in Combobox and Textbox Controls2.3 KiB536This uses the HideCaret and ShowCaret API calls to hide the caret (or blinking cursor) in the Textbox or Combobox control. Remember that the control whose caret you want to hide or show Must have caret ownership at the time of calling or it will fail. Also when the control loses ownership it will reset and you will have to call the APIs again. IF you always want the caret to be hidden in the control, try putting the HideCaret code in the _GotFocus event of the control.
Load Textfile (*.txt) in a Listbox1.2 KiB562Simply shows how to load each line from a text (.txt) file to a Listbox control.
Login/Logon an Application with Username/Password Protection1.9 KiB680A small example of using either Inputbox or a Form to require proper username and password credentials for basic authorization. An option is available to require case sensitive username and password or non case sensitive.
Meta Html Tag Generator3.1 KiB513A small project where you can simply enter the keywords and descriptions you want for your Html Meta tags, and it will generate the meta code ready to copy and paste.
Misc. Windows Information1.5 KiB540Uses api to show you how to get some Windows based information. Get the Windows Directory, System Directory, Temporary Directory, User name and Computer name. Uses the GetSystemDirectory, GetUserName, GetTempPath, GetComputerName, and GetWindowsDirectory API calls.
Movie Player with Module7.5 KiB603This uses my movie module to play various movie formats. Should have no problems playing your typical .mpg, .avi, .wmv, and etc.. formats. You can install new codecs to play newer formats as well. I had to slightly update this download because of Win7, but hopefully XP is still fine.
MP3 Encoder Example7.1 KiB567This is for encoding a wave file to an mp3 file using a C++ DLL and lame_enc.dll. The mencoder.dll C++ .dll is based around the Lame Encoder If I remember correctly. But I haven't been able to get it to work recently with Vista/Win7. Maybe search for a newer encoder project.
MP3 Player using WMP321.8 KiB555This shows how to play mp3's and other audio types with the window media player control. You may have to add a new reference. Not sure if it still works with the latest Windows or WMP versions the same way.
MP3 Tag Editor 1.1 Compatible4.5 KiB592This shows Reading and Writing MP3 Tags. It is compatible with Tag v1.0/1.1 but not 2.0
Music Player App with Music Module8.5 KiB899This shows how to use my Music Module. Shows how to get started to make a full-featured music style application. Play most of the popular formats like mp3, wave, midi, etc..
OCX Control Example2.2 KiB573This is an old, simple project of how to make an ocx file. It makes an old AOL style Command Button
Pinging Example with Fusion Wrapper from .NET13.0 KiB484Shows how to use a VB 2005 ComClass wrapper that gives Visual Basic 6.0 basic Ping capabilities. The wrapper exposes two Functions. One that Pings a Network Address and Returns True or False depending on whether the call got a reply from the destination. The other function is similar except it returns the time it took to get the reply from the url destination (RoundTripTime). This project includes a Bin directory with the .TLB and .DLL .NET files. The source code to the Fusion Wrapper is located under the Visual Basic.NET - Controls sections. The .NET Framework needs to be installed on the target computer for Fusion to work. You will need to register the library or compile the VB 2005 project which will register the control as a COM object and then add a reference to its TLB file or Register the TLB File in the Registry.
Play a Wave File18.6 KiB536This is an old self-extracting download from that plays a wave file. I believe it uses the PlaySound Windows API from the WinMM.dll.
Play Two or more Audio Files Simultaneously 2.6 KiB1147This shows how to use MCI via the MCISendString Function to playback and control multiple files at the same time in VB 6.0. It can independently change the volume for each as well.
Scrolling aTextbox to the Bottom and the Top1.5 KiB550This will make a multi-line textbox control scroll to the bottom of its contents, and also scroll/move to the Top of its contents.
Search a Listbox/Combobox Control1.8 KiB533This shows how to search a listbox or combobox. Has two methods of searching their contents.
Shutdown, Restart, and Log Off Windows using ExitWindowsEX3.0 KiB498A simple example of using the ExitWindowsEx API to Shutdown, Restart, and Log Off Windows XP and newer. It likewise should work fine with Vista/7 as well. If you've ever had the problem of ExitWindowsEx not working with Windows 2000/XP and above, then check out this example to see why. The short answer is you need to adjust your application token to give it the proper priviledges before Windows will respond.
Shutdown, Restart, Log Off using Shell code1.3 KiB494This shows how to Shutdown, Restart, and Log Off Windows XP and newer without API. It uses Shell to manipulate the Shutdown service while passing specific flags to perform the actions. Note: The Shutdown service will obviously need to be running for this to work. It is always On by default so you shouldn't see to many cases of this code not working.
Timing - Good Resolution using timeGetTime3.2 KiB455This uses the timeGetTime API function to time some Visual Basic code. It also uses the timeBeginPeriod and timeEndPeriod APIs to specify the resolution the counter is to use. This timer supports up to 1 milli-second resolutions which is much more accurate compared to the GetTickCount counter. This example will get the timers resolution and test how long it takes to complete some code.
Timing - High Resolution using QueryPerformanceCounter4.1 KiB470This example uses QueryPerformanceCounter and QueryPerformanceFrequency for very high resolution timing. It supports sub-millisecond resolutions so it is obviously more precise than the getTickCount and timeGetTime timers. Usually this counter will use a clock on the computer's motherboard which a lot of time is about 3.6mhz (3579545 ticks per second) or even 14.4mhz. Sometimes it will use the CPU's RDTSC register. Call QueryPerformanceFrequency and examine the value to see what the average counts are per second to determine the frequency. IF a 0 is returned then the computer most likely does NOT support this counter or the API call parameter is not passed Byref which is required.
Timing - Standard Resolution using GetTickCount2.5 KiB443Uses the GetTickCount() API function to time Visual Basic code. This timer has a resolution of about 15-16 milli-seconds and should not use all that many resources. This example will calculate and display the timers resolution and see test how long it takes to complete some code.


2 thoughts on “Downloads – VB 6.0 Examples

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.