Visual Basic Code Source
Free and Unique code for Visual Basic

 Current page : Home

Free VB Code and Free Visual Basic.NET Source code, Examples, Tutorials, Links, and other resources



Visual Basic Source Code for FREE Site - VBFORFREE.COM is another one of my VB sites with many articles, source code snippets, tutorials, and more for ALL VB's.

Popular - Visual Basic and Visual Basic.NET Examples
Address Book Database- A simple address book example using a database
Autocomplete Capabilities- Add autocomplete features to textbox and combbox controls
Calculator Example- A simple example of making a small calculator program with basic features
CD Class Module with Example v2.1- A class for playing cd audio disks and a example on how to use it
Change Windows Desktop Wallpaper- An example of how to set the desktop wallpaper to a custom wallpaper
Check if a File or Directory Exists- A example that uses the Dir function and FileSystemObject to see whether a file or folder exists
CPU Usage Example- Uses the GetSystemTimes APi call added in XP Service Pack1 to calculate the cpu's usage
MP3 Player Examples- There are examples for playing MP3,Wave,WMA files using MCISendstring library and the windows media player control
Shutdown, Restart, Log Off Example - A example of using the ExitWindowsEx API or Shell to restart, shutdown, loggoff Windows XP/Vista
Timing Examples- some examples of using the GetTickCount/timeGetTime, and the QueryPerformanceCounter API for High Resolution timing

    Latest Site Updates - 2011, November 22nd
  • November 22nd 2011 - I added a new version of the csEasyEncoder EXPress Edition program. It has been updated to version 2011. The major new features includes the ability to specify the B-Frames and Reference Frames to use for the video encode, mainly for MPEG based formats. Also included is the ability to specify both the Resolution and the Aspect Ratio to use when encoding your video files. Another addition is the ability to use video de-interlacing when encoding the video file. I likewise added the latest ffmpeg.exe encoder and the changes that needed to be made for the program to be compatible with the new version of the ffmpeg encoding library. Some minor changes was made as well like cleaning up some code and trying to make some of the code more efficient. The main download for the compiled program and setup installer is under the Software section. The example source code for Visual Basic .NET 2010 is on the Examples webpage and under the VB 2005 and Higher section near the bottom of that page. Hopefully the update will be useful to you. :)
  • October 3rd 2011 - A new example for VB 2005 and Higher has been added on how to very easily do Simple Zipping and Unzipping of files using the DotNetZip library. The example itself is pretty simple and basic. It highlights the basic functions of the DotNetZip library to zip-up and compress multiple files, then unzip and uncompress the files to a specific location. I do have some other code outlined as well though like getting progress updates for the zipping and un-zipping operations along with how to create a self-extracting .exe file using the DotNetZip class. The example was made with Visual Basic 2008 but the source code is compatible with VB.NET 2005 and VB 2010 as well. Located on the - Visual Basic.NET - Examples page near the bottom of the page under the VB 2005 and Higher section.
  • September 23rd 2011 - I added a new example called csEasyMailer v1.0. It is a complete program with many advanced features for sending email messages using SMTP with Google Gmail, Microsoft Hotmail, and Yahoo as the smtp host. It has full support for multiple recipients, multiple carbon copies (cc), multiple attachments and much more. It also can send email as plain text and as html. You can send multiple email views which will allow the email provider to decide which view to show to the user. It has basic contacts support and support for sending email messages with a custom html based signature. It has a feature that will allow you to preview your html email viewing its full formatting and all. It was made with VB 2008, but the codes will work in Visual Basic.NET 2005, and Visual Basic 2010. Located in the VB.NET - Examples section near the bottom of the page. I will have a new v1.5 version done later on that fixes some issues and has better support for saving contacts and such.
  • June 28th 2011 - A new example for Visual Basic.NET 2005, 2008, and VB 2010 has been added. I used Visual Basic 2008 but the code itself is usable in basically all dotNets. The example is on how to get the computers total cpu usage and display that value as text in the windows system icon tray. It will also plot a graph of the cpu usage history with lines. It uses the GetSystemTimes API call to get the total cpu usage. This is similar to the sysmonlite example but more refined and more features. So if you want to know how to put or add text to the system tray, or icon tray as some call it, then check this example out. Located at the VB.NET - Examples, page under the VB 2005 and Higher section near the bottom.
  • April 21st 2011 - I added a new example on how to play embedded wave files compatible with VB.NET 2005, VB 2008, and Visual Basic.NET 2010. Shows adding a .wav file to your project and then setting the Build Action to Embedded Resource. Shows how to access the wave file through The Reflection.Assembly class and accessing the: GetManifestResourceStream stream to pass to the wave player. Uses the SoundPlayer class in .NET 2.0 and above to perform the playback of the .wav file. While .NET 1.0 and 1.1 based VB.NET supports embedded resource files, it would have to use the PlaySund api call to perform the playback.
  • December 21st 2010 - Added a cool new program I called csEasyEncoder 2010 eXPress Edition for download and the source code in the VB.NET 2005/2008/2010 - Example page. This application will encode music and video's into other formats. It can convert MPEG4 .MP4, Flash Video .FLV, .AVI, MPEG2 .MPG using Video CD (VCD), SVCD (Super Video CD) and DVD quality presets to many different formats like thoses already mentioned and even HQ (High Quality) H.264 MP4, and Windows Media Video. Very easily convert Flash Video to or from .MP4 MPEG 4 or really most of the popular formats. You can also convert to .FLV Flash video. If you have a Music Video, or a video you only want the audio/sound/music from then this program will strip/save/convert the audio portion only and save it as a .MP3 or .WAV file! There are more features and formats available but can't list them all here. This program uses the very nice FFMPEG.exe library to perform all of the encoding tasks. FFMPEG has been around for awhile and has grown into a very popular and easy to use commandline utility for encoding/decoding media files and more. This program completely interacts with the ffmpeg.exe file and gives you a fully working gui without the user ever seeing a console window or even suspect the encoding is coming from a external .exe library. The example shows how to send input commands and flags plus parse the output from the library to provide progress and media statistics to display to the user. So if you ever wanted to make your own Visual Basic based Video/Music encoding program without all of the major bit manipulating or paid libraries, then check out this example with the ffmpeg.exe library. This is also the first program and example i've made with Visual Basic 2010 thus far. I actually used the Express edition of VB.NET. The source code is 100% compatible with older versions of dotNet as well. I may port it down to a older version of Visual Studio .NET at a later date though. The program also takes advantage of multi-core cpus/processors (Dual Core, Quad Core, Hex Core), using multi-threading where possible. Some formats like wmv and flv only support a single thread though. Anyways, the csEasyEncoder 2010 eXPress setup download for the program is under the Downloads - Software page and the full source code along with the ffmpeg.exe and x.264 hq based preset files are located under the: Visual Basic.NET - Examples page, in the Visual Basic 2005/2008/2010 only section. Have fun! :)
  • November 13th 2010 - A new example has been added using VB.NET 2005 (The source code itself is usable in basically ALL versions of .NET). The example is how to determine if the operating system your program is running on is 32-Bit (x86) or 64-Bit (x64) and whether your program itself is running in 64 Bit (x64) mode or in 32 Bit (x86) mode. I include about 5 methods to determine the addressing mode the OS is running on and about 4 ways to determine which mode your application itself is running in. Some of the methods I use is checking a registry key, using environment variables querying the "PROCESSOR_ARCHITECTURE" and "PROCESSOR_IDENTIFIER" variables, API calls like GetSystemInfo/GetNativeSystemInfo, WMI and more! You should have a pretty good idea about the computers addressing environment after using the methods in this example. The example is located under: Visual Basic.NET - Examples page under the VB 2005/2008/2010 section called: Check If OS is 32 Bit or 64 Bit. I should also mention that Visual Basic 2010 (Really .NET Framework 4.0) has a new feature built-in called: Environment.Is64BitOperatingSystem, which is a property that will return True if the operating system is 64Bit and False if the os is NOT 64 bit (x64) but is 32 Bit (x86).
  • October 12th 2010 - A new and perhaps unique based application, setup, and example program called: csYoutubeDownload XPress1 for downloading youtube video's has been added. The example app actually has some slightly advanced features and shows how to download a backup of your youtube video files using DownloadFileAsync, and use DownloadData for downloading into memory which I use to save a copy of the thumbnail image associated with the based video and how to use a couple url tricks to get google to give you the video download in the mpeg4, .mp4 based format if its available and the normal .flv format (Flash Video) format. This example uses the DownloadFileAsync feature of the .netframework to download the video's and will provide alot of various info about the download like the download speed, elasped time, how much time is left for the video to be finished and much more! It can also tell you the title of the video, format types. I use a simple little class I found at which will format the youtube based url's into downloadable urls straight to the video. I made this program for my personal use and educational purposes. You should not use it to download any videos other than the ones you uploaded yourself. So please keep that in mind if you decide to use any code from this example. Also included a setup project in case you ever want to export your program using a pretty cool setup utility that you have quite a bit of control over compared to the very limited clickonce utility that is included in the express edition ide's. Anyways, this program was made with Visual Basic .NET 2008 that targets .NET 2.0. The source code will work perfectly fine in Visual Basic 2005 and VB 2010. I mainly used VB 2008 because the actual program needs elevated permissions (Admin Access) to work properly and uac (User Account Control) is much easier to implement using VB 2008 than VB 2005 which you have to do a hack to request elevated uac access. The example download includes both the program project source, plus the setup project in the same solution. The compiled setup program is available in the Software section of this website. Anyways, Have fun!
  • July 18th 2010 - Added a new example using Visual Basic .NET 2005 but is fully compatible with VB 2008 and Visual Basic 2010. The example is how to download files from the internet and then save the contents to the computers hard drive, usb drive or other location on the target computer. I use the Webclient class and more specificially the Webclient.DownloadFileAsync subroutine. I use this sub to download files to the computer from a url/uri and add 3 different handlers to fire a couple methods to get progress information and such. Some of the features are getting the bytes the download is currently at, how big the download is. I also added custom code on getting the approximate download speed the file is downloading at in both Kilo-Btyes and in Kilo-Bits format, and more minor features like the elapsed time for the current download is included. Another advantage of using the DownloadFileAsync sub instead of the normal DownloadFile sub is that it won't consume your applications thread. In other words your application will still respond and be usable while its downloading. The normal DownloadFile will make your application freeze unless you run it in a seperate thread apart from your main programs thread. Located on the Visual Basic.NEt - Examples page under the VB.NET 2005 section. Enjoy!
  • July 18th 2010 - I finally got around to make a simple program and update the website. I want to mention that the example also includes a project I made for this program on making and customizing a setup project/executable for your programs. It shows many things you can do with the setup options like specify the background image of the setup dialogs, custom icons to use, setting up your shortcuts into the start menu, desktop, and much more! Definitely worth checking out if your wanting to know alittle bit abount the Setup project type. Anyways, the new program is called csCPUTargeting eXPress v1.0. What this program does it help make the task of Targeting a cpu artchitecture alitte easier than doing it manually using the Express Editions of Visual Basic. Basically the problem with VB Express 2005, 2008, and VB 2010 is that Microsoft removes the simple option of targeting either a 32-bit cpu or 64-bit cpu for your applications. If you ever get a crash with: BadImageFormatException error with the message: "An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)" it could be a cpu targeting problem. Usually by default your applications uses the 'AnyCPU' targeting option which will run in both 32-bit (x86) and 64-bit (x64) operating systems. But lets say your accessing a regular C++ based .dll that was compiled and setup for the 32-bit x86 format and your application is running in 64-bit mode. You could very well get that Incorrect Format crash since your targeting a x86, 32-bit assembly. By specifying your applications to run specifically in 32-bit mode your applications will interop just fine the way its meant to with x86 32-bit assemblies. Anyways, what this tool does is load the .vbproj file for your project and add a line of xml code: " ". Between those tags you can put either 'x86' for 32-bit or 'x64' for 64-bit targeting. The application makes it possible to add the code to either/both Debug and Release configurations. Then the tool will save the edited project .vbproj file with the changes you made. You also have the option to backup your original project file as well along with some other features. The compiled execute will be under the: Software section of the site and the programs source code will be on the: Visual Basic.NET - Examples webpage. This tool was made using Visual Basic 2005 and includes some code commenting as well. Anyways, hopefully this application and/or source code will be useful to you. BTW, the XML added to the project file is: with either x86 or x64 inserted between the tags. :)
  • December 30th 09 - Site has finally been updated with something! To bad its nothing much to write home about. But anyways, I've added a new application example called: csWindowsCDKeyTool v1.0 that will get the DigitalProductID of the installed operating system and then convert/decode/decrpyt that value which is the cd key for the windows currently installed. The GetProductID key is located in the system registry under: "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\". The code that does the actual transformation of the product id code into the windows cdkey was Not made by me. The example lists the possible author of the code. Anyways, I added some other stuff to the app that will get alot of various info on the windows installation, like whether windows is 64-bit or 32-bit. The code uses wmi (Windows Management Instrumentation) using the System.Management.DLL reference and System.Management.ManagementClass plus the ManagementObject class to check whether the os is Windows 32 Bit or 64 Bit(32bit/64bit). The rest of the code uses the dotnet .net framework, and environment variables to get the info. The cd key tool works with ALL versions of WindowsXP, Windows Vista, and Windows7 (Should work on the servers as well like Windows Server 2008). The example vb code is VB 2005 and Visual Basic 2008 compatible and located under the VB.NET 2005/2008 examples page. Have Fun!
  • December 30th 09 - As you may already know, this site has not been updated in over a year. I've been very busy building and fixing computers and havn't had the desire to do any type of programming either. But I wanted to update the site with something before the year ended. So I will be adding a basic application example on getting the windows cdkey shortly.
  • September 21st 08 - A new application called: csComputerInfoTool v1.2 - The Vista Edition has been added under the software section. The example is under the VB.NET 2005/2008 - Examples page. This app uses the registry, performance counters, Windows Management Instrumentation (WMI), and the .NET Framework to get alot of various info on the computers cpu/processor, motherboard, video card, memory/ram, c: hard drive, and the Windows OS. The tool was made with Microsoft Vista in mind but it may work fine in Windows XP. Some features or problems could pop up though. IF you just want the example then the OS shouldn't matter unless a feature is not available in the older operating systems.
  • August 19th 08 - A new example for VB.NET 2005/2008 has been added on how to set cpu/core affinity to your applications process. It uses the System.Diagnostics.Process.ProcessorAffinity Property located in the Process Class. Since many computers these days are running AMD Athlon X2's and Intel Core2's you may want to set which core you want the process to run on. The example was made with .NET 2005 but the codes do work with earlier Visual Basic.NET 2002/2003 versions of vb.
  • August 5th 08 - A basic .NET 05/08 example has been added on how to get some lower level volume information about a hard drive or other disk drive. It uses the GetVolumeInformation API which returns the volumes serial number, filesystem, maximum supported characters and such. Located on the VB.NET - Examples page under the VB 2005/2008 section. While this API does return a unique serial number when querying a hard disk drive, it is the serial number for the Volume and NOT the actual Manufactors serial number given to the harddrive. To get that you can use WMI (Windows Management Instrumentation) which 'should' give you the true serial number value for the harddisk. An example will be added soon. The WMI class you want to use is: "Win32_PhysicalMedia" and the property to use is: " SerialNumber". Just in case you wanted to know. :)
  • July 15th 08 - I added a new example for VB 2005 and/or VB 2008 on how to play movies and videos on your windows desktop. I also included code on how to set the transparency/opacity level for the movie window so you can see what is behind the screen only. I didn't include any position or resizing code since this simple example focuses on basic playing of videos and movies while setting the desktop as the parent for the movies window screen. The older csMovieLibrary for .NET has all of those features though if you want them and includes Much more as well (So does the VB 6 based Movie Module class library). While this project won't open in Pre-2005 ide's, the codes in this example should be compatible with 02/03 versions with just some minor code changes. Even VB6 can use the codes with code changes. I may include a example for VB 6 in the future though. I guess its also worth mentioning that this app plays most all of the popular movie formats including the normal .avi, .mpg, .mpeg, .wmv extensions. But it can play mpeg4 divx, apples quicktime mov, and many others as long as the codec for that format is installed. Thats all for now!
  • June 11th 08 - The complete source code to my csAudioCD Library v2.5 for VB 2005/2008 has been released. It is under the VB.NET - Controls page version 2.5. Read the license agreement in the source code. Have fun :)
  • May 8th 08 - Another example for VB.NET 2005 and 2008 has been added that shows how to use the System.Collections.Specialized.StringDictionary class to store pairs of strings in a collection. IT shows how to add, remove, count, find/search for items and more. This String Dictionary example is on the Visual Basic .NET - Examples page near the bottom under the 2005/2008 area.
  • May 7th 08 - A new class has been added called csAudioCD Library v2.5 - The Professional and Enhanced Edition for VB 2005 and VB 2008. This is the ultimate class library made with Visual Basic 2005 to make a very feature rich audio CD player based application. There are over 50 features available and are very easy to understand and use. Most all of the subs/functions/propertys are fully XML commented with descriptions and explanations. It of course has your basic play/stop/pause features but some of the other features include opening and closing the CDRom and/or DVDRom drive, auto-scan the computer for available CD/DVD drives and can detect whether a CD Disk is in the drive and see if its a audio cd or not. IT can return some useful info about the CD and about the tracks on the CD's. Has available different time-format features as well for getting the length and playing position for both the audio CD and the Tracks for the CD. Way to many features to list here. A example application has also been added that shows how to use this library and implement some of its features. The compiled class by itself is on the VB.NET - Controls page and the Example application which already includes the compiled class .dll is available on the VB.NET - Examples page under the Visual Basic 2005 and Visual Basic 2008 section. I might release the source code to the class library soon. Have Fun!
  • April 21st 08 - A new example for VB.NET 2005 and Visual Basic 2008 has been added that shows how to create a simple image or picture viewer and features a basic slideshow feature. The slide show will go through the list of images while having a simple pause before each image changes. There is a audio sound or music feature as well if you want to play a audio file while the slideshow is running. The example shows how to use a sortedlist with a key and value related to that key to hold the entire path of the image but making it so the user will only see the filename instead of having to see the entire path with the filename. There are basic picture/image Left and Right rotation features as well. Located in the VB.NET 2005/2008 - Examples page near the bottom of the page.
  • April 8th 08 - A new example for Visual Basic 6.0 has been added that simply shows a couple ways on how to check if a file or a directory or folder exists at the specified path or not. It uses the Dir function and the FileSystemObject in the Windows Script Host Object Model to do the checking. Located in the VB 5.0 and VB 6.0 - Examples page.
  • April 6th 08 - There were two new examples added to the site. One is for Classic VB and the other is for VB.NET. They are both on how to hide or show the caret (blinking cursor) for a textbox and combobox control using the HideCaret and ShowCaret API calls. Remember that the control whose caret you want to hide/show Must be the owner of the caret at the time of calling these APIs. Also when the control loses ownership of the caret it will reset the caret and you will have to call the HideCaret API call again. But if you want the caret (blinking, flashing; cursor or whatever you want to call it) to stay hidden try putting the HideCaret code in the controls GotFocus event. Which whenever the control gets focus, it will hide the caret from the user even if another control temorary gets ownership.
  • March 24th 08 - Another example for VB.NET was added as well. This example uses the LinkLabel control to mimick a real webpage link. The control will look and act like a common link on a webpage. When the link is clicked, it will open the default webbrowser application and load the address specified in the LinkData property of the control. Compatible with all .NET VBs including Visual Basic 2005 and 2008.
  • March 24th 08 - A new example for VB.NET has been added named Ultimate Textbox Manipulating. As the name entails it shows how to do Many things with the standard textbox control. Some of the codes are: searching, selecting text, page right/left, line right/left, page up/down, line up/down, getting line and character information, along with cut/copy/paste and adding, replacing, selecting text. Check out the example or the screenshot to see what all is available.
  • March 13th 08 - I updated the VisualBasic.NET version of the Scrolling Textbox to Top/Bottom example. There is now another way to scroll the textbox editbox to the top and bottom my using the Windows API. It uses the SendMEssage API to be precise. I plan on doing the update to the regular visual basic version later on sometime.
  • March 10th 08 - Added two new examples to the site. One is for VB.NET and the other is for Visual Basic 5.0/6.0. They are both on how to scroll/move to the top/beginning of a textbox controls text contents and likewise scroll or move to the bottom/end of the textbox controls contents.
  • March 8th 08 - If the .info download server is down, you can replace .info with .org to try and get the download. Example: can be changed to: I will try to eventually add a secondary/backup link on all of the website pages like I did on the VB Classic - Examples page.
  • March 8th 08 - A new example for VB.NET has been added that will check a IP, URL, or UNC (Universal Naming Convention) name using the "IsDestinationReachable" Windows API call to see if it is reachable or not. It can return the to and from speed of the network used to try and reach the destination along with the type of network available. This can somewhat be considered a pinging example in a sense but you wouldn't get accurate reply times since the API will also get the Network type and the To/From speed before returning control to your application. But it would be good to see if a specified destination is available or not. VB 05/2008 already has a full Ping class for checking a destination. I would recommend you use that class if using those versions unless you want the network to/from speed or whatnot.
  • March 5th 08 - An example for Visual Basic .NET has been added that shows how to convert Unix Time to a Structured Windows based time. It converts and displays the Unix time based on UTC Time and the Computers Local Timezone. The example displays the current Timezone and the Timezone offset compared to UTC (Coordinated Universal Time or Universal Time Coordinate) as well. This example is compatible with all versions of .NET including VB 2005 and VB 2008. A simple upgrade process is all thats needed for 05/08.
  • March 4th 08 - A new example for VB.NET has been addded. Its basically a near clone of the VB 6.0 version that uses the GetPerformanceInfo() API Function to get various low level computer information. It mainly returns various memory info along with some thread and paging data. I am pretty much Computer Info'ed out so I may not be making anymore computer performance info data examples.
  • March 3rd 08 - I went ahead and changed the download links to point to my web server. The original .org server is down and I don't have any idea when it will be running again. But anyways, all of the downloads and screenshots SHOULD be working. Please send me a feedback message if there is a download not working.
  • March 2nd 08 - As you may already know is that the downloads are currently not working. Unfortunately the server that all of the downloads and screenshots are on is down at this time. All I can tell you right now is to try again later. Sorry :(
  • February 19th 08 - A new example for Visual Basic 6.0 and 5.0 has been added on how to get high resolution timing using the QueryPerformanceCounter and QueryPerformanceFrequency API counters. This timer supports sub-millisecond resolutions which is better than timeGetTime and far better than the getTickCount timer. This timer will usually use a 3.6 Mhz clock on the motherboard for timing but sometimes it could use your processors rdtsc counter. Examine the QueryPerformanceFrequency returned data from its ByRef parameter to see what the ticks per second of the timer is. If the function returns a 0 then the computer does Not support the timer or you did NOT pass the APIs parameter ByRef(By Reference) which is Required. Do Not pass the parameters for these two (2) QueryPerformance APIs ByVal(By Value) because they WILL fail. You Must pass them ByRef. IF you need very precise timing, then this counter should be the way to go.
  • February 18th 08 - Another example for Visual Basic.NET 2002/2003 and compatible with VB 2005/2008 has been added. This example shows how to perform basic Math calculations using string variables/objects. It shows the Addition, Subtraction, Multiplication, and Division based operators. The main purpose I guess is how to perform Math operations on Strings in a somewhat safer way. It basically uses the Val() Function which will examine a string and if the string is a number or if the string starts with a number then it will convert a object/string to a double or a Char to a integer type. IF the string contains no number or doesn't begin with a number then it will simply return a 0 which will keep your application from throwing a improper casting error message and/or crashing. A VB 6.0 version may be put up soon.
  • February 17th 08 - A small example made with Visual Basic.NET has been added that shows how to use delegates and callbacks to create and use a higher resolution windows based API Event Timer. This example uses the timeSetEvent/timeKillEvent APIs which supports much higher resolutions than the original SetTimer/KillTimer APIs at about 1 milli seconds compared to 15-16ms. This timer is actually a part of the winmm.dll multi-media library that has most of the multi-media based apis like the Playsound and mciSendString apis. Anyways, its located in the .NET - Examples page.
  • February 8th 08 - A new example made with Visual Basic.NET 2008 on using the Managed Windows API Timer from the DotNET Framework was added. The codes in this example is compatible with VB.NET 2005 but the project will Not load in 2005. The managed timer was added in version 2.0 of the framework which VB 2005 is based on. This example shows how to create a timer and have it call a function of your choice each time the specified interval has elapsed. This timer appears to be a managed wrapper around the SetTimer/KillTimer APIs from the User32.dll library that I made a example for VB.NET a few weeks ago. The resolution is only about 15/16ms. You can try using the Un-Managed multi-media timeSetEvent/timeKillEvent APIs which supports resolutions up to 1ms and is based on the winmm.dll library. I do have a example on these multi-media apis but never released it. I may do that later on though.
  • February 8th 08 - The example on how to Clear All Textboxes, Manipulate or Set properties for all conrols on a form has been updated. The update has new codes that shows how to skip over or bypass controls specified in the code and clear or set the rest of the controls that are Not specified to skip.
  • January 29th 08 - I added a new Control I made with C++ with _stdcall exports so it can be used by Visual Basic under the .NET - Controls page. The control will return some various basic cpu info like the model, vendor, stepping, clockspeed, ect... A example on how to use the library made with VB.NET 2002/2003 and compatible with Visual Basic 2005/2008 has been added to the .NET - Examples page.
  • January 28th 08 - I meant to post this along time ago but forgot too. Microsoft now has available all of the Visual Studio.NET 2008 Examples that were included with the RTM (Released To Manufacture) versions as a seperate download. There are actually very MANY examples available for Visual Basic 2008 that covers everything from Excel, Powerpoint to LINQ, Tablet Based Programming, Server based, and Database programming. While the examples may NOT open with VB 2005, the codes in many of the examples should work with Visual Basic 2005 as well. Obviously examples like LINQ based source code won't work with .NET 2005 since LINQ was not supported until VS 2008. Anyways, Click this Link if your interested. The download is alittle more than 9 MB, so if you have Dial-Up it may take awhile. :)
  • January 24th 08 - An example for Visual Basic.NET has been added that shows how to get the Textbox Controls - current line number (#) in VB.NET 2002/2003 (The VB 2005 and VB 2008 Textbox has a feature for this, but is Not in this example. Might add later), getting the total numbers of lines in the textbox, and getting the text/characters at the current line position.
  • January 17th 08 - A new example for Visual Basic 6.0 (the code in the example is VB 5.0 compatible) has been added that shows how to use the GetEnvironmentVariable API call function to access some pre-defined variables and get/retrieve their values. You can see some Environment Variables if you go to the 'Start' then 'Settings' menu and click on 'Control Panel'. Click on the 'System' icon and then the 'Advanced' tab. Click on the button that says 'Environment Variables' which should display a window with pre defined variables and their values.
  • January 16th 08 - I added Two (2x) new Examples for Visual Basic 6.0 (Codes should be usable in 5.0). Both examples are related to using two of the available system timers/counters. Since I have a few timer related examples for, I figured I would do the same for VB Classic. So one of these examples uses the GetTickCount API Function and the other example uses the timeGetTime API Function along with the timeBeginPeriod and timeEndPeriod API calls. The GetTickCount timer/counter supports about 15 ms resolutions, while the timeGetTime counter/timer supports up to 1 millisecond resolutions. Go to the VB - Examples page under Timing to check out the examples. I might make 1 or 2 more Timing related examples for the VB.COM (5.0/6.0) versions using a Very High sub-millisecond Resolution performance counter-timer(QueryPerformanceCounter) and possibly another on a super high resolution timer(RDSC).
  • January 8th 08 - Edit: All of the downloads are working again. IF you find any downloads or links not working please send a simple feedback message to me from the Send Feedback page.
  • January 5th 08 - A example for VB.NET 2003 (2002 as well) and compatible with VB 2005, Visual Basic 2008 has been added. The example is how to do some basic Form/Application effects using API codes. Some of the animations is a Left to Right, Right to Left, Top to Bottom, and Bottom to Top directional effects. Some special effects is Blend, Roll, and Slide. You can also specify how fast or slow the effect will take place. At the .NET - Examples page.


FREE - Visual Basic 2005 Express Edition Download


If your interested in Visual Basic 2008, Click Here to download the Free IDE  


What is Silverlight? Click Here to find out. 


VB 2005 Keyboard Shortcut Poster
If you want the keyboard poster,  Click Here to download. 



    Our Agreement: By downloading and/or using any of the code or resources from this site, you agree NOT to misuse and/or use for any malicious purpose. You agree NOT to steal or take any of the code with the intent of claiming it to be yours. You are free to use all of the code here in your projects and take bits and pieces of code as you like. Please do not edit or take out the Title, By, Website, Email, Description, or Copyright information that the code may contain. Please do not do anything with this code here that you wouldn't want someone to do to yours. I am not responsible for anything that happens even if your using the codes and resources from this site.

Visual Basic Code Source - Copyright 1999-2012
[ Check my Website Uptime Status ]

eXTReMe Tracker