Visual Basic
Visual Basic.Net
Downloads
Links
Support This Site
Contact
Welcome to my humble little website devoted to the Visual Basic 5.0/6.0, Visual Basic.NET 2002/2003,
and Visual Basic 2005 programming languages. You will find Free and 'Unique' - Source Codes,
Examples, Tutorials, Code Snippets, and other Resources available for all to download and use
within the common courtesy guidelines. That is, not doing anything with my content, that you
wouldn't want someone to do with your content.
Click this link to goto my brand new website design!.
Click this link to head over to my new site named Visual Basic for FREE, with links, tutorials, answers, and articles related to all versions of Visual Basic 5.0/6.0, VB.NET and 2005/2008. Should be useful for beginners.
There is now a copy of the new webpage design available. Simply click here.
Year 2008 below
[3/08 - I believe I Finally have this old design updated to the examples added to the new website design. You should use the new design at http://www.vbcodesource.com or http://www.vbcodesource.com/index.php for now on since those pages will always have priority with updates and news and such. These old pages may not be updated for a long time whenever something new is released. There will probably be a point to where I won't even update these old pages anymore.
[3/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.
[3/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.
[3/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.
[3/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.
[3/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.
[3/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.
[3/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.
[3/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.
[3/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.
[3/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.
[3/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.
[3/07 - 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 vb.net, 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).
[3/03 - I changed the download links to point to a different server because the .org download server is down and I don't know whats going on with it. Please send me a feedback message if you find any bad links.
[3/03 - I will most likely NOT be updating this old website designed pages with new content. There is actually a bit of new stuff on the newer design that is not available on these old pages. So goto the main http://www.vbcodesource.com webpage link which will load the newer website design.
[1/28 - 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. :)
[1/05 - 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.
[1/01 - A new Class Library named csCPUFeatures Library 1.0 and a Example on using the class control with VB.NET is available as well. This library uses the IsProcessorFeaturePresent API call and will let you know if the CPU supports 3DNow!, SSE, SSE2, RDSC, Intel FPU Bug, MMX, and more. The source code and compiled class is under the DotNET - Controls page, and the example made with Visual Basic.NET is under the .NET - Examples page.
Year 2007 below
[12/29 - Two(2) new examples has been added, one for VB 5.0 and VB 6.0, and the other is for Visual Basic.NET. Both examples show how to change/set or manipulate all controls on a form without having to specifically write code for each of the controls. The examples will automatically go through each control on the form and Clear all Textbox controls and will also checkmark all checkbox type controls. Much easier and alot less code than if you manually set each of the controls properties!
[12/28 - A new example compatible with Visual Basic.NET through to Visual Basic 2008 has been added that shows how to display a Inputbox and setting the Input/Textbox to display as Password Characters. Its just like when you set a textbox controls passwordChar property to display astericks characters in place of the actual password characters. IT uses Subclassing and Window APIs like FindWindow, GetWindow, and SendMessage Functions. Under the VB.NET - Examples page.
[12/27 - Added a new program and example called csNotePadX 1.0 and it is supposed to be a better windows notepad. It is built around the textbox control and has every feature the windows notepad has and more. Has full printing, print preview, page setup support along with simple and advanced find/search and replace features. There is character casing, character alignment, and Font support as well. Under the Visual Basic.NET 2005/2008 - Example section.
[12/24 - A new v2.0 update to the csBrowserPlus Webbrowser Example for VB 2005 and Visual Basic 2008 has be posted. A major feature added from the v2.0 update is adding/editing/deleting your own custom favorites menu and will load and save on application load and exit. IT will dynamically create menu items under the favorites menu with the url as the title/text for each favorite you want to add. Check out the screenshot to see what I mean. There are a few other minor features as well, like selecting all/none text, open a new csBrowserPlus Window Clone or a default browser window like Internet Example or whatnot. Located on the: Visual Basic.NET - Examples page under the VB 05/08 section near the bottom of the page.
[12/19 - Another example for Visual Basic.NET has been added. This example is based on the VB 6.0 Chr Converter Example. Some minor code changes/tweaks has been made. This example will convert normal text to Chr based code. Example, the quote character " will be converted to Chr(34). In the VB.NET - Examples section.
[12/19 - A new example for Visual Basic.NET has been added that shows how to use delegates to create a callback to be used with the SetTimer and KillTimer Windows API Timer. The example simply has the callback fire a simply sub that will update the number of times windows called the callback and then display the results.
[12/16 - A new example for VB 5.0 and VB 6.0 has been added that shows how to give your Textbox and Combobox controls autocomplete capabilities. The example uses the SHAutocomplete API call and includes many different flags/options to tweak exactly how your want SHAutocomplete to react and what you want to be available in the list. This example includes extra code as well to enable autocomplete features to a combobox. :) Under the Visual Basic 5.0 / Visual Basic 6.0 - Examples page.
[12/15 - I've now added a basic calulator example for Visual Basic 2005 and Visual Basic 2008. IT has your basic Addition/Subtraction/Multiplication/Division features. Some more features are Sign changing, Number Reciprocal, Round Values, Backspace, Clear, and more. The example is in the Visual Basic.NET - Examples section under VB 2005/VB2008.
[12/14 - The original Visual Basic 5.0 and VB 6.0 calculator example has been updated to v1.1. The update will now clear a previous calculation instead of adding the pressed number to the calculated value. Example: IF you press 1 + 1 and then the = button, it will display 2. But before this update if you pressed another number it would add to the previous number. If you pressed 3, then it would read 23. This update fixes that problem and will start a fresh calculation before adding the pressed number. A new 'Calculator' Example compatible with Visual Basic 2005 and Visual Basic 2008 will be added shortly.
[12/12 - A new example has been added for Visual Basic 5.0 and Visual Basic 6.0. The example shows how to use some Windows APIs like: SetWindowRgn, CreateEllipticRgn, CreateRoundRectRgn, CreateRectRgn to create custom/abnormal shaped forms. The example sets the form as a Circle, Ellipse, and Rectangle using these API calls. In the VB Classic - Examples section.
[12/07 - Added a new example compatible with Visual Basic 5.0 and Visual Basic 6.0 that shows how to setup Username and Password protection in your applications. The example shows how to use Inputboxes and/or a Form to authenicate or allow a user to put in the proper Username and Password. Has a option for requiring Case Sensitive or Case Insensitive credentials. Located in the Visual Basic - Examples section for VB Classic.
[12/06 - A new example for Visual Basic 5.0 and Visual Basic 6.0 has been added that shows how to get the computers total cpu/processor usage percentage using the GetSystemTimes API call. The example gets the user time, kernel time, and idle time values from GetSystemTimes() and calculates those values as a percent value. The usage is based on ALL of the computers processor's and not just one of them. If you have 2x CPU's or Cores it will be the total across BOTH processors. Ex: If CPU/Core #1 is 100% percent usage and CPU/Core #2 is at 0% percent usage the total usage percentage would be 50%. Also the GetSystemTimes() API is not available until Windows XP with Service Pack 1 and above. Windows Vista and Windows Server 2003 and above is supported as well. I already have a example for Visual Basic.NET if you use VB.NET.
[12/02 - A new example made with Visual Basic.NET 2003 and usable with VB 2005 and VB 2008 that was based on the Visual Basic 6.0 version detects and displays the users last and latest system wide mouse and keyboard activity. Remember that the user could be at the computer reading or whatnot that doesn't require mouse or keyboard interaction.
[11/27 - Added a new example made with Visual Basic.NET 2003 and usable with Visual Basic 2005 through Visual Basic 2008 that will search a listbox and combobox control for specified strings with exact or partial find results.
[11/26 - The Address Book Database Example project for Visual Basic 5.0/6.0 has had a minor update. Removed some dead code and updated the Data Bar Control to where it will not look in the projects directory for the .mdb database address file. At the VB - Examples page.
[11/23 - A new example for Visual Basic 5.0/6.0 has been added that will check/get the last time the user was active on the computer. It uses the GetLastInputInfo API and retrieves the returned tickcount value and compares to the previous value to see if the user is active or not. Remember that just because there is no activity reported doesn't mean the user is away from the computer. They could be reading a webpage, article/document, and such. The Example is located under the: Visual Basic - Examples section. A dotNet (.net) version will be added later on.
[11/21 - The official Visual Studio 2008 RTMed Languages are now available!. Microsoft has posted the downloads for all of the Express Edition IDEs. Visual Basic 2008 has some new features that you may want to check out, including LINQ support. Click this link to goto the VB 2008 Express Editions downloads page. I also have for more info and links at this link to my VBForFree.com site. Unfortunately Microsofts download server was getting hammered when I downloaded earlier today. Hopefully it will get better as the day wears on. Have fun!
[11/20 - Added a new Example and Control that shows how to make a Fusion ComClass wrapper in VB 2005 and a Visual Basic 5/6 example. The com wrapper creates 2x functions that contains code to give Visual Basic Classic (5.0/6.0) easy Network Address Ping capabilities. One function returns true or false depending on whether the ping was successful and the other will return the time it took for the url to reply. The Fusion Pinging Wrapper is under the Visual Basic.NET - Controls; section and the example is under the Visual Basic 5.0/6.0 - Examples; page. The target computer must have the dotnet framework installed for this wrapper to work.
[11/19 - I mentioned that the csTextBoxX Control has been updated to version 1.1 but it somehow got lost and therefore was not available to download. I have since restored it back to the .NET Controls and 02/03 Examples pages. Version 1.1 brings a new feature to Search the Textbox control text.
[11/15 - There were even more downloads missing than I originally thought. I "Hope" I have everything right. PLEASE let me know if the news/update page says a download/example or whatever has been added but you can't find it on the site. That would really help out!
[11/15 - I have no idea on what happened but the Examples pages and such were missing MANY downloads. Especially the Visual Basic.NET and 2005/2008 Examples. SysMonLite, csMiniMeter, Writing Pad, RichText Example, csMusicLibrary and MUCH more has been added. THANKFULLY, my .org site had the downloads or I would not have had them to update. I guess a old backup replaced the new?? Oh well, I would suggest you check out ALL of the pages to see what you may have missed. Sorry about this :)
[11/14 - I added a new example made with Visual Basic.NET 02/03 that shows how to do simple subclassing to move a borderless form that does not have the normal titlebar. Thankfully Subclassing is alot easier to do in dotnet then it was in VB 6.0 :) Remember that VB 05/08 should have no problems running older .net projects.
[11/09 - A new example for Visual Basic 5.0 and/or Visual Basic 6.0 has been added that shows how to get some lower-level based memory information using the GetSystemPerformance API call along with the PERFORMANCE_INFORMATION data structure I found at Microsoft MSDN and converted from C++ to VB. IT can give you various system memory based info like - Kernel Paged/Non Paged/Total, Commit Charge based info, Physical Memory info, Handle/Process/Thread totals, System Cache and more. Located under the: Visual Basic - Examples page.
[11/06 - The csWindowsShutdown Library has been updated to Version 1.4. The new update brings a couple tweaks to the code/comments and a new feature that will display the: "System Setting Change" dialog along with a "The system must restart before the settings will take place" message. You can also add your own message with the default dialog message. The example for this library has been updated as well. The example was made with VB.NET 2003 but remember older .NET codes/programs can be used with VB 2005 and VB 2008 as well! Have fun :)
[11/04 - You may have noticed some small changes made to the site. I plan to do more in the future as well. Even moving to a completely new design when possible.
[10/28 - A new example has been added for Visual Basic 5.0 and VB 6.0 that will Shutdown, Reboot, and Log Off ALL versions of Windows including 2000/XP using the ExitWindowsEx API function. If you've ever tried using ExitWindowsEx in 2000/XP/Vista and it wouldn't work, then check out this example to see why :) It is located under the: VB 5.0/6.0 - Examples page.
[10/11 - Added a new example for Visual Basic.NET 2005/2008(or simply Visual Basic 2005 and 2008 which I think is the official name now anyways). The example is how to Send EMail using the SMTPClient Class in the .NET Framework(DotNET). IT also shows how you can use your GMail account as the Host to send your mails. The example has the normal: To, From, Subject, Body/Message, and Attachment features. Its actually VERY easy to send mail with VB 05/08 and should be easy to understand and follow...
[10/07 - In case you haven't heard yet, Microsoft has decided to release the source code to the .net (Dot Net) libraries. This is actually a pretty big jump for Microsoft. There is a Reference license you must ahere to though. Click this link to check out the blog post for one of the team leaders at Microsoft on this release...
[10/07 - Added a new example for Visual Basic.NET 2002/2003 and Visual Basic 2005/2008 that will get the color of a pixel where the mouse cursor is positioned at. Located on the VB.NET 02/03/05/08 - Examples page.
[09/17 - Added a new small Utility called csCPUMiniMeter v1.1 that will monitor and display your computers total cpu system usage and along with your memory usage. Displays via progress bars and a graphical display similar to the way Windows Task Manager displays the usage in a graph. The program is available under the: Software section and the source code to it is under the: Visual Basic.NET 2005 - Examples section near the bottom of the page.
[09/07 - If you haven't checked out my expansion/extension page: Code Source - Links and Tips in awhile, I did many updates to the site within the last week or 2. Added a article on the Counters and Timers available for VB programmers (GetTickCount/timeGetTime/QueryPerformanceCounter/RDTSC), all of the VB 5.0/6.0 Code Snippets/Articles/Fusion resources. Also other various links and resources for Visual Basic.NET 2002/2003 and Visual Basic 2005. Click Here to go to the Links and Tips page!
[08/02 - Microsoft has now released "Beta 2" of their new Orcas languages. They have the Express, Standard,Professional, and ect... editions available for download. . Click Here
[07/26 - I added a new cool little program to the software section and the source code to it that will monitor and display your computers total cpu/processor system usage in the system tray. It will show actual numbers in the tray. It contains a right click context menu with various options. This program is a system tray app only, no form interface. If you want the code for this, It is available in the Visual Basic.NET 2005 - Examples page. :)
[07/20 - I recently finished up a new expansion site with tips, answers, articles, links and more for Visual Basic.NET 2002/2003 and Visual Basic 2005. Click here to check it out. And just a reminder my new site design in nearly done and contains most of the content this site has. You can start going to it at This Link..
[06/07 - I will eventually phase out the design of this site to the new design. I won't change it over until the new design is completely finished though. You can start going to it at This Link..
[06/07 - My new site design is nearing completion! Go check it out at this Link!!.
[05/15 - Added a new update to my csTextboxX control to Version 1.1. The new version brings a new function to search the controls text for a certain string/letter/text with various search properties like Match Case. Some code has also been cleaned up. This project is almost done with but I have one or two more features in mind as updates. The compiled control and source is under: Visual Basic.NET - Controls, and the Example is under: Visual Basic.NET - 2002/2003 Examples.
[05/10 - Feedback is currently using a guestbook script and it works. It will be changed to normal once the mail form gets fixed. Thanks
[04/30 - The feedback option isn't working for some reason. I will continue to work on it. So, don't use that feature yet.
[04/22 - Added a new site feature for sending feedback. The feedback/email link is located on the left menu at the bottom just under Contact. I also removed a dead link that was on the left menu.
[03/24 - Microsoft is at it again! That is, giving away FREE stuff. Here is the Link with all of the Info. You MUST meet certain requirements though to cash-in on this promotion. You need to be a professional developer employed in the developer field and be in the United States. You need to go to the Microsoft website to see all of the requirements and restrictions. They DO have some nice LabCasts. A few are on Visual Basic 6.0 to Visual Basic.NET 2005 stuff. Which should help alot of people out who are wanting to make the switch to Visual Basic 2005. Enjoy!
-----------------------------------------------------------------------------------
For a limited time, attend Visual Basic 2005 Labcasts and you will be eligible for one or more of the following incentives:
This promotion is for United States residents Only. I'm sure that will disqualify alot of visitors. Hopefully they will end up extending this promotion to other parts of the world.
-----------------------------------------------------------------------------------
[03/17 - Added a new example for Visual Basic 2005 that shows how to get started using some of the common, basic features of the RichTextBox control. I guess the example could be considered the beginning of a Wordpad based application. It shows how to do unlimited Undo/Redo's, Cut/Copy/Paste, Changing the Font/TextColor/Backcolor of the selected text or for the entire document along with a couple more features that are highlighted. Located in the Visual Basic.NET 2005 - Examples page.
[03/04 - I added a new software application named csWritingPad v1.5 under the Downloads\Software section and the complete source code to the entire application under the: Visual Basic.NET 2002/2003 - Examples page. This is a word processor based application with alot of 'Unique' features and puts the Richtextbox control through its paces. Has multi-level Undo/Redo, Advanced search and replace capabilitys, Insert Text and Images in your RTF documents, Protect selected text or the entire document from being deleted, has the ability to set the Font/Color/Size and such to the selected text or the entire document. There is Printing and Page Setup capabilitys to Print your documents and much more. There is really way to many features to list. Download the Application or the source code to check out all of the available features. If you've been wanting to do more with the RichTextBox control or wondering how to do a specific task check out the project source code to see if what you want to do is already done for you. Enjoy! :)
[01/29 - Added a new example for Visual Basic 5.0/6.0 that is actually a update to the original Drawing Example. IT has been improved and no longer skips. Located in the VB 5.0/6.0 - Examples section.
Year 2006 below
[12/24 - I added a new example for Visual Basic 2005 on loading all of the computers opened processes and the various data associated with those processes. It uses a single line of code to load the data in a DataGrid control. Also a example here and there has been added over the last few weeks but I didn't advertise them. I can't remember which ones they were either so you may want to look over the pages to see if there is something that interests you. That is all!
[12/05 - A example of using the csMusicLibrary v3.1 has been added. IT shows how to use some of the features. Playback, Recording, and such.
[12/02 - The long awaited release of the new version of the csMusicLibrary is here! It is named: csMusicLibrary v3.1 - The Professional Series. It is a class library built from the ground up with Visual Basic 2005 and for Visual Basic 2005. Has Many enhancements, additions, and changes compared to version 1.0. You can now play multiple files at the same time, do basic recording to wave files, most all the subs, functions, and properties are XML commented. It has never been easier to create a full-featured audio/music application with Visual Basic 2005. Just download and add a reference to the .dll. The library is located under the Visual Basic.NET - Controls section. A example of using the library will be added soon. I just need to make a couple tweaks to it. Enjoy!
[11/15 - Finally remembered the other example I uploaded the other day. Its called: MDI Forms/Windows Example - Visual Basic.NET 2002/2003 Edition. It is a basic example of how to create and use MDI Form/Windows in your applications.
[11/13 - I also fixed my 'webmaster' email address. It has been messed up for some time. Sorry about that :\
[11/13 - Added a new example for Visual Basic 2005 called: Bouncing Ball 2005. Its pretty much the 2002/2003 version with the addition of a speed control. Otherwise, it is quite similar to the older version. Located in the Visual Basic 2005 - Examples page. I think I added something else the other day but I can not for the life of me remember what it was.
[11/13 - Fixed the Visual Basic 2005 downloads. Sorry about that. Hopefully everything is completely stable now after the server move. Please let me know if somethings not right.
[11/05 - Added a new Tutorial for Visual Basic 2005 on: 'How to Create and Setup a Splash Screen' for your applications. Very simple and easy to follow. Located in the Visual Basic.NET - Tutorials section.
[11/04 - Alright, all of the downloads appear to be working now. I also fixed the download link for: Visual Basic 5 - Control Creation Edition (CCE). PLEASE let me know if there are ANY broken downloads. Thankyou :)
[11/04 - I am currently trying to move the downloads to a new server. The downloads won't work unless you take the www. out of the download link. Example: http://www.vbcodesource.org/download.zip - Change that link to: http://vbcodesource.org/download.zip. Sorry for the inconvenience. I hope to have it fixed very soon. Thankyou for understanding. :)
[10/31 - I will be transferring my download domain in a day or 2. So it could be a couple days or so before you can start downloading again. I really am sorry for having to do this.
[10/07 - Microsoft has now released Windows Vista *RC2* to the Public. This should be the Last major pre-release before it is finalized and RTM (Released To Manufacture). Click Here - Which will take you to my .info Portal site with the info to get you started.
[09/18 - I put up links to Microsoft to get and download the: Redistributables, Runtimes, Service Packs, and SDK's for all versions of Visual Basic.NET. 2002/2003 and 2005. Located on the Visual Basic.NET - Reference section of this website.
[09/15 - I added Version 1.3 of the csAudioCD Library and a updated example application that shows somes of the librarys features and how to use it. A new function was added to version 1.3 but the main updates were XML comments. You now have full XML Intellisensed comments and explanations at your disposal for almost every Sub, Function, and Property the library contains. So it has never been easier to use or create a full-featured CD Player application using this library. The csAudioCD Library itself is located under the Visual Basic.NET 2002/2003 - Controls page and I decided to go ahead and Include the source code with the compiled .dll this time. A example of how to use the library is located on the: Visual Basic.NET 2002/2003 - Examples page. Enjoy!
[09/07 - Put up a new article/tutorial and example for Visual Basic 2005. It shows how to create your own properties/settings that can be listed under the: My.MySettings interface. I show how to use this feature to very easily implement the ability for your application/program to memorize the size and position it was when it was closed/unloaded. Then when the application opens, it will refer to these properties and set its Position and Size accordingly. No need to use specific registry settings or a .ini file which was usually the common way of adding these features. The example shows these features in action and the turorial shows how to setup and use these features and properties. They are both for Visual Basic 2005.
[08/31 - I added a new example for Visual Basic.NET 2002/2003 called: Directory and File Information Tool, that simply uses the DirectoryInfo Class and the FileInfo class to get alot of various information about the selected directory or the selected file.
[08/24 - There was a billing mixup with my webhost yesterday, and therefore the website was down most of the day. Everything appears to be in working order now and I am sorry for any inconvenience it may have caused.
[08/13 - You may or may not have seen the website undergoing some pretty major design changes. I still have a ways to go and it will take a couple days to finish the last few pages.
[08/04 - Added a new example for Visual Basic 2005 called: Basic/Simple Threading - Background Worker. As the name suggests it shows how to use the new BackGroundWorker class added to the 2.0 version of the DotNet Framework. It shows how to use this new object to spawn a new thread completely seperate from your main application thread. Located in the Visual Basic.NET - Examples section under the VB.Net 2005 examples. Multi-Threading doesn't get much easier than this!
[08/01 - I added a new update to the Visual Basic.NET 2002/2003 csWindowsShutdown library. It has been updated from Version 1.2, to Version 1.3. The new version brings a new function that will display the "Turn Off Computer" dialog programmatically without the user having to do it from the Start menu. Also a new option to use 'Shell' to execute the shutdown/restart/logoff process has been added. Other minor tweaks here and there has been done too. The example for the library has also been updated to reflect the changes and features.
[07/07 - I added a Great MANY new Code Snippets for Visual Basic 2005. There are actually 12x new Code Snippets to be exact. Most of them use the new 'MY' interface to perform the tasks. This is a really useful feature for Visual Basic.NET 2005 and I suggest you check it out. :)
-----------------------------------------------------------------------------------
[06/28 - I added a new software download under the Downloads\Software webpage called: csFileIcon Extractor Tool v1.0. This is a very small application that makes it VERY easy to extract the icon from almost ANY file you select in MANY different image formats. The application was made with Visual Basic.NET 2005. I also added the source code to the program for Visual Basic 2005 under the Visual Basic.NET/Examples page.Visual Basic.NET 2005 Updates - Code Snippets
Check if a File or Directory Exists
Check if the Computer is Connected to the Network
Clear the Windows Clipboard
Copy, Create, Delete, and Rename a Directory
Copy and Paste (Get/Set) Text to the Clipboard
Download File from Internet to Hard Drive
Get the Computers Display Resolution
Get the Amount of Free(Available) Physical and Virtual Memory
Get the Computers Total Physical (Ram) and Virtual Memory
Get the Operating Systems - Full Name, Platform, and Version
Ping the specified Url/Address
Play/Stop a Specified Wave File and System Sound
I 'think' thats all of the code snippets and the right titles. Hopefully you will find some of these new snippets helpful.
-----------------------------------------------------------------------------------
[06/27 - A new example has been added for Visual Basic.NET 2002/2003 that shows how to retrieve/calculate/display the computers total CPU Usage using the GetSystemTimes() API function that was added with Windows XP Service Pack 1.
[06/08 - Added a new control called: csTextBoxX v1.0 and a Example of how to use the control. The control and example are for Visual Basic.NET 2002/2003. The control is a eXtension to the normal Visual Studio.NET 2002/2003 - Textbox control. The csTextboxX control has full support for AutoComplete. Has 3x different Auto Complete Modes to choose from, along with several Auto Complete Sources to select. The control has built in support to disable the 'Beep' that accurs when the user presses the "Enter" key if the control is in SingleLine mode. IT also has a property for restricting all characters except Numbers or only Numbers with a Single Decimal point to be entered. The control is in the Visual Basic - Controls page, and the Example is under the Visual Basic.NET - Examples page. The example zip already has the compiled control included.
[06/08 - Windows Vista 'Beta 2' is NOW available to the public. That means most of you and me! Of course the downloads are huge so you will want a high speed connection. OR you can order the DVD from Microsoft for a small fee to most countrys. Anyways, Click here to goto my Portal site which has all of the details listed and some links to get you started.
[05/31 - The source code for my csAutoComplete Class control is now included with the download in the Visual Basic.NET - "Controls" download file. I also added a couple new website links for Visual Basic 5.0/6.0 and Visual Basic.NET.
[04/28 - I added a new Class Library for Visual Basic.NET 2002/2003 called csAutoComplete along with a Example of how to use the control. As the name of the class says, it makes it VERY easy to add 'Auto Complete' support to your ComboBox and TextBox controls. The Class is in the Controls section and the Example is of course in the .NET Examples section.
[04/15 - Microsoft has another promotion going on for ASP.NET 2.0/Visual Basic 2005 Developers. You get a Free Discovery Pack and it does include a couple of decent items. Click here to goto my Portal site which has all of the details listed. My .info 'Portal based webpage setup is much better for listing these kind of news 'things' :)
[04/09 - The VB.NET 2002/2003 examples for the csWindowsShutdown v1.2 library and a example for the csRdtsc.dll called 'Get the CPU Timestamp/Calculate Processor ClockSpeed in Realtime' has been added 'again'. Sorry about that happening. I also added a example for the csRDTSC.dll in Visual Basic 2005 and Visual Basic 6.0. So, all modern Visual Basic languages has a example for the csRDTSC.dll and returns the timestamp of the cpu cycles and calculates and displays the clockspeed of the processor in realtime. Enjoy!
[04/07 - I wanted to mention that I know about the .NET 2002/2003 csRDTSC and csWindowsShutdown Examples missing. I used a old .html for a update, and it didn't have the updated items. I will fix that in a day or to. The Controls are there though if you don't need a example.
[04/07 - Added 2x new examples. They are both examples of using the csRDTSC.dll to retrieve the processors RDTSC Tick value and Calculating the cpu's clockspeed in realtime. 1x example is for Visual Basic 6.0 and the other new one is for Visual Basic 2005.
[03/28 - A new Control called csRDTSC.dll has been added on the Visual Basic.NET - Controls page. Plus a example of using the csRDTSC dll with Visual Basic.NET 2002/2003 called: getCPUTimeStampAndSpeedEx. This is a example of using the csRDTSC .dll to retrieve the CPU/Processor rdtsc value and then uses that info and calculates and displays the processors actual clockspeed in Realtime. I've noticed a few people has been wanting something like this so I went ahead and made it. Enjoy :)
[03/22 - The 'csWindowsShutdown Library' Class and Example for the Library has been updated to Version 1.2. This update added 2x new functions, "initiateSystemShutdown" and "cancelInitiatedShutdown". The new functions will initiate the computer shutdown process with forced shutdown and reboot options implemented. The other will abort the shutdown process if it has been executed.
[03/19 - Added a new 'csWindowsShutdown' Class and Example for the Library. This class makes it Very Easy to shutdown/restart/logoff Windows. It uses the "ExitWindowsEx" api function and YES, it works with Windows NT/2000/XP operating systems. Check out the Class Library source code for more info. The Class is located under: Visual Basic.NET 'Controls' and the Example is under the same language version in the 'Examples' section.
[03/14 - I fixed the problem with the MP3 Encoder under the Visual Basic 6.0 Examples. The MP3 Encoder.DLL relied on the Lame DLL library and you would get a dll not found error, and thus, made the example useless. Sorry it took so long for me to fix. But now, it should Encode MP3's just fine and no errors. Make sure you have the .DLL's in the proper directory and you should have no 'file not found' errors with it.
[03/14 - I have completely revamped the 'VB Developers' page under 'Downloads'. Five (5x) new downloads has been added. Along with the authors names and webpage, if they had one. A couple of the submissions was received in 04 and I did a aweful job of keeping up on it. I am very sorry to the authors for such a long delay. All 5x of the downloads are VERY Nice examples/tutorials/controls for Visual Basic 6.0. If you have anything you want to share, send it to my 'Upload' email addy located on the contacts page. I will do much better at keeping up this time. :)
[03/05 - Added a new example for Visual Basic.NET 2002/2003 called csWebBrowser Control Example. IT is a complete example of how to use the 'Com' based WebBrowser Control in your .NET 02/03 applications or even make your own WebBrowser application. The example is commented well and located in the VB.NET 2002/2003 Examples page.
[02/19 - I just wanted to mention that I added a new article/tutorial on adding 'AutoComplete' support to your Textbox and Combobox controls in Visual Basic.NET 2005.
[02/16 - In a effort to free up some webspace on the .com server, I have moved almost ALL downloads to the .org server since I have MANY times more space available on that server. PLEASE TELL ME if ANY downloads are Broken! Mail me to my Webmaster email addy located on the Contacts page. Please let me know if there are ANY website problems in general also. Thankyou :)
[02/16 - There have been quite a few updates made to the website. Mainly new snippets and examples for Visual Basic.NET 2005. The updates that have not been documented yet are listed below. Some of them may have been on the website for awhile.
-----------------------------------------------------------------------------------
Visual Basic.NET 2002/2003 Updates - Code Snippets
Check for a specified String in a String
[ 01/20 - Added a new link to another Visual Basic 6.0 decompiler. It is MUCH better than the old one that is available for download under the 'Utility' download page. This one is considered a half-decompiler, which is more than the other one can do. VBReFormer is the name of the decompiler. There is a Free version and a Professional paid version available. The link to the 'Free' version of VBReFormer is located under Downloads in the 'Utility' section of the website.
Check if Class/Object needs new instance or if its disposed, ect
Disable the 'Beep' in a Textbox when pressing the 'Enter' Key
Find/Search for a String in Listbox/Combobox control
Open a URL/Webpage in the Default Web Browser
That is all of the 2002/2003 code snippets that I can remember.
Visual Basic.NET 2002/2003 Updates - Examples
CPU Usage Example - A basic example of easily retrieving the value for the cpu's usage. Displays the exact usage value
or the integer portion only.
Thats the only 2002/2003 Example that I can remember.
===================================================================================
Visual Basic.NET 2005 Updates - Code Snippets
Check if a String contains a specified String
Check if your Class/Object needs a new instance or is disposed
Disable that 'Beep' in the Textbox control when pressing the 'Enter' Key. [Method #1]
Disable that 'Beep' in the Textbox control when pressing the 'Enter' Key. [Method #2]
Only allow Numbers in a TextBox Control
Open a Webpage/Url with the default Webbrowser
Thats all of the fairly recent 2005 snippets that I remember.
Visual Basic.NET 2005 Updates - Examples
Application Interaction using SendKey Controls - A very small and basic example of using sendkeys to interact with a
application in another process.
Audio/Video Direct X 9.0 Example - A fairly in-depth example of using the Audio/Video objects in the DX9 library. It
shows you to use DX9 for your normal media playback and a few different interface feature.
CPU Usage and Data Example - A fairly extensive example of how to use Visual Basic.NET 2005 to use Performance Counters
and the Windows Registry to retrieve various information and statistics on a computers cores/processors.
csBrowserPlus WebBrowser Example - This is a fairly complete example of how to make your own custom and advanced
WebBrowser using the new managed WebBrowser control in version 2.0 of the DotNetFramework.
MP3 ID3 v1.0 Tag and Wave Header Reader Classes - with Example - This example includes a MP3 ID3 v1.0 Tag Class to get
the MP3 tag data, and Wave Header Extraction Class to get the data from the Wave File header (bytesPerSecond, sampleRate, ect..)
Thats it for the Visual Basic 2005 Examples as far as I can remember.
-----------------------------------------------------------------------------------
[ 01/12 - I made quite a few updates to the Visual Basic.NET 2002/2003 - Snippets and a couple new Examples for Visual Basic.NET 2005. After I add a set of updates for Visual Basic.NET 2005 - Snippets, which are ready to be added, I will list ALL of the updates that hasn't been documented on the main page yet, I just don't have the time now to finish adding the VB.NET 2005 snippets and I want to list everything at the same time. I will mention, that 2x new Visual Basic.NET 2005 - Examples has been added, 1x example is: CPU Usage and Data Example and the other is: Audio/Video Direct X 9.0 objects - Example. Both examples are for VB.NET 2005.
[ 01/12 - I've updated all of the download links to a new server. So, PLEASE, if you find a broken link mail me at my webmaster email address on the contacts page. A few small tweaks has taken place too.
Year 2005 below
[ 11/21 - If you have been here before you may have noticed some changes to the website. I have been changing the colors to make it easier on the eyes and more appealing. Hopefully you will like the results when they are all done. :)
[ 11/21 - I added a new example for: Visual Basic.NET 2002/2003 on using performance counters. It goes over the QueryPerformanceCounter timer, timeGetTime, and the TickCount timer. It is a pretty extensive example with various features including calculating the resolution of each timer. Located in the Visual Basic.NET - Examples section under VB.NET 2002/2003.
[ 11/15 - I meant to post this the other day but forgot. :) - I wanted to let you know that you SHOULD go ahead and REGISTER your Visual Basic.NET 2005 Express Edition software. Microsoft is GIVING you some 'Gifts', completely FREE if you register. This applies to ALL - Express Editions software not just VB.NET. Click this link to goto the "Visual Studio Registration Benefits Portal" website. There are Royalty-FREE Icons/Images for download that you can use in your applications at NO CHARGE. Also available is: Visual Basic.NET 2005 'Build a Program Now' Tutorial, WebPlanner 2005 for ASP.NET, Graphics Server.NET Interactive Charts, IP Works ADO.NET Data Provider. The Icon/Image bundles are: IconBuffet Studio Edition Icon Suite and Corbis Images. Hope this post was useful for you!
-----------------------------------------------------------------------------------
[11/07 - Microsoft has now released the Express Editions of Visual Studio.Net 2005.
And one of the best parts is that you can download all of the express editions completely FREE for 1yr.
Evidentally, what this means is that the Express editions will be available for download for 1yr, but you can continue using
the software forever. Only the download for 'Express Edition Software' is only available for 1yr.
This release of the Express Additions includes:
Visual Web Developer 2005 Express
Visual Basic 2005 Express
Visual C# 2005 Express
Visual C++ 2005 Express
Visual J# 2005 Express
SQL Server Express
Below are links to download EVERYone of the MSDN Express Edition downloads available.
I'm sure that most from visiting this site will download Visual Basic :)
Anyways, below are the links of interest for this software release.
The MSDN Forum post announcing the release.
Download for - Visual Basic 2005 - Express
Download for: Visual C# 2005 - Express
Download for: Visual C++ 2005 - Express
Download for: Visual J# 2005 - Express
Download for: Visual Web Developer 2005 - Express
Download for: SQL Server Express
Hope this post proved useful to you! I will continue to post more info and such as I find it. -Jason
I will be looking over this release of Visual Basic 2005 and see what changes/additions and such has taken place and if
anything is worth mentioning I will let you know what I found out. :)
-----------------------------------------------------------------------------------
[ 10/23 - I've also ran out of webspace for the website. I ended up having to move some of the bigger files to FileH.com to free up some space on the server so I could add the new examples to the webpage. I do have a few more updates to add to the Visual Basic.NET 2003/2005 - Examples page, when I finish up a few details with them and get the time.
[ 10/23 - OK, I added 2x new examples for Visual Basic.NET 2005
[ 10/20 - I added: '7' - Source Code Snippets for Visual Basic.NET 2002/2003, and a few days ago I added: '8' - Source Code Snippets for Visual Basic.NET 2005
<-------------------------------------------------------------------------------->
Visual Basic.NET 2002 and 2003 - Source Code Snippets:
1 - Add 'all' Date/Time Formats to Listbox/Combobox
2 - Add 'all' Special-Folders to a Listbox/Combobox
3 - App.Previnstance Equivalent
4 - Generate Random Numbers
5 - Get a list of 'all' available Fonts
6 - Messageboxes with 'Multiple' Lines
7 - Timeout/Pause for specified Time
Visual Basic.NET 2005 "BETA2" - Source Code Snippets:
1) Add all Date and Time formats to Listbox/Combobox
2) Add all Special Folders to Listbox/Combobox
3) DoEvents_Sub Routine
4) DoEvents_Sub Routine WITH the - 'GetInputState' - API Call
5) Generate Random Numbers
6) Get a list of available Fonts
7) Messageboxes with Multiple Lines
8) Timeout or Pause for a specified time
<-------------------------------------------------------------------------------->
[ 10/17 - Fixed the download link for: Visual Basic 5 CCE (Control Creation Edition) program under: Utilitys. I had to remove it a few weeks ago do to webspace reason's. I now put it up onto a different server and have it hotlinked to that server. Thanks to FileH.com for the webspace! More of the bigger downloads could end up over there so I don't have to upgrade my webserver host plan. I am already slightly over the 150MB limit and I do end up over 3GB tranfer limit each month. So this should really help me out, or at least hold off the upgrade for awhile. If you want 2500MB of FREE space, then goto: FileH.com. And no, I have no relationship at all with them :) So i'm not trying to spam you or anything :) Just trying to help!
[ 10/10 - I added a new Visual Basic.NET 2005 'Beta 2' Source Code Snippets section under the: Visual Basic.NET - Snippets, page of this site. I guess about 5 or 6 or so for right now. I have 5 or 6 more for Visual Basic.NET 2002/2003 to add also but I need to find the time to add them to the site. There were also some minor examples for Visual Basic.NET added last month but I didn't mention them or anything. I do have a few more examples for .NET to add too when I get the time.
[ 08/26 - I added a new example for Visual Basic.NET 2002/2003 that shows you how to Shutdown, Restart, and Log Off of Windows XP from your applications. This is similar to the Visual Basic 6.0 version, with a few tweaks to the code here and there. The example could work on Windows 2000, but I do not have the OS to test it out. Located of course, in the VB.NET 2002/2003 - Examples section.
[ 08/19 - Added a new example for Visual Basic.NET 2002/2003 in the VB.NET - Examples section. It shows you how to create 3 different Play features: Continious Playing, Repeat Playing, and Random Playing of music files. It uses my csMusicLibrary for the playback.
[ 08/08 - OK, I added a NEW Tutorial for the DotNETFramework (specifically Visual Basic.NET 2002/2003/2005, but can be applied to ALL languages). It is called: mciSendString Tutorial v1.5 - DotNet Edition. The tutorial with example app is located in: Visual Basic.NET - Tutorials section. This tutorial will TEACH you how to write your OWN code to program the mciSendString Device Command Interface to play all of your music and movie files, pretty much almost ALL of your media needs. I break it down bit by bit to give you a thorough explanation of each command, parameter, flag, ect.. ALOT OF WORK went into making this. Please feel free to email me with any feedback to the email addy in the tutorial. Hope you enjoy :)
[ 07/29 - I added a new Visual Basic.NET 2005 - 'Beta 2' section on the VB.NET - Examples, page. I also made it easier to navigate the 'Examples' for the 3x different VB.NET languages, by providing links to the different versions. PLUS, I ported ALL of the 'Beta 1' Examples to 'Beta 2'. You probably already know that 'Beta 1' Projects will NOT compile in 'Beta 2'. Anyways, hopefully this new setup on the VB.NET - Examples page will make it alittle easier for you. DITTO for the new VB.NET 2005 'Beta 2' examples. :)
[ 07/27 - MSDN has released another FREE Online Book called: "Introducing Visual Basic 2005 for Developers". Click Here - to go get the free book. This book should specifically help newbies and VB6 programmers to pick up on VB.NET much quicker. Enjoy!
[ 07/25 - Added a new example for Visual Basic.NET 2002/2003. It is a Monitor Files and Folders example using the FileSystemWatcher Class library. It will display and log what takes place with the folder that is being monitored. I made it easy to use and understand. It will let you know when a folder or file is deleted, renamed, changed, and so on. Located in the VB.NET - Examples section.
[ 07/23 - Microsoft has a new FREE Online Book available called: "Upgrading Microsoft Visual Basic 6.0 to Microsoft Visual Basic .NET". This book is 21 Chapters long and covers everything from 'API to ZOrders' in relation from VB 6.0 to VB.NET. One of the bests parts is that its FREE. Click Here - to go get the free book. Hopefully this news post will help someone out. :)
[ 07/19 - I finally have my new csAudioCD Library Professional v1.1 ready and released. This new csAudioCD Library Pro v1.1 Class Library was created for Visual Basic.NET 2002/2003. Of course, it can be used with about all of the .NET based languages. This library makes it VERY easy to create a full-featured CD Player application. I also have a example application that shows you how to use the library. The class library by itself is located in the VB.NET - Controls section of this website. The example is located at the VB.NET - Examples page. ALOT of WORK and TIME went into making this Library and Example. Please feel free to send me any comments or suggestions on how to improve it. I will have a new updated EXPERT edition available fairly soon with even more features and probably some bug fixes.
[ 07/09 - Thanks to all of the worthless spammers I had to change my email contacts and create the addresses on a image. Pretty sad I have to go this route.
[ 06/19 - I added my new csCompactMusic Library v2.1 based on the csMusicLibrary Pro class library. This compact version has some features taken out compared to the Pro version. But it can still do everything you need to make a nice application based on it. Would be great for games, screensavers, music apps, and more. It can play - MP3's, Wav's, WMA's and More! Just add a codec to play any new formats! It is a low latency and low overhead class library that uses minimal cpu resources. This Library has been Highly optimized compared to the Pro version. It is only 10.5KB in size! It is 1/3 the size of the Pro version with more than 90% of the features! The Class .DLL is in the VB.NET - Controls section and the Example App with the Class .DLL included is in the VB.NET - Examples section. I will most likely release the source code in the future.
[ 06/08 - Added a basic example of how to very easily retrieve the Processors (CPU's) current usage in Visual Basic.NET 2002 and Visual Basic.NET 2003. This example uses the "PerformanceCounter" component to get the job done.
[ 05/17 - I added a new "Properly Using DoEvents()" example for Visual Basic.NET 2002/2003 under the VB.NET - Examples section. This example shows how to use Doevents() properly and increase the performance MANY times over. Your application will NOT freeze either! The end user can STILL interact with your application! It uses the GetInputState Api call to check to see if any messages (mouse, ect..) needs to be processed. If they need to be processed THEN it will use DoEvents(). If no messages needs to be process, DoEvents() is not active. Thus getting MAJOR increases in performance. This example also shows how to use the "QueryPerformanceCounter" and "QueryPerformanceFrequency" functions to test/time the performance of your code. I WILL eventually port this example to VB 6.0 since only minor changes needs to be done and VB 6.0 will also get great benefits from using DoEvents() properly.
[ 04/27 - Microsoft has now released a new beta of Visual Studio .NET 2005. You can only download the full Visual Studio 2005 suite if you are a MSDN account member. If you are not a member, you are able to download the express versions of Visual Studio.NET Beta "2". Visual Basic.NET Express 2005 Beta "2" is available to download for non-msdn member subscribers. I downloaded and installed it and am checking out some of the new features, changes, enhancements, ect. Looks like there are quite a few changes that has taken place compared to Beta "1". When I go over it in more detail and such I will mention some of the new additions, changes, improvements, ect. in the future. For now, go ahead to this microsoft website and download the Express addition of Visual Basic .NET 2005 Beta "2" or whatever language it is you are wanting to check out. Just click the "Learn More Now" below that is below each of the Languages.
[ 04/09 - Added a new example for Visual Basic 6.0 on how to Shutdown Windows XP, Restart Windows XP, and Log Off Windows XP. Uses *Shell* code and does NOT use API. Located in the Visual Basic - Examples section.
[ 04/01 - Added and updated Crop Images - Extended Example in the Visual Basic.NET - Examples section. This example is the combined Crop Image - Mouse and Coordinates Example projects. A couple bugs were fixed that the other examples contained.
[ 03/15 - Added screenshots of the 2x Crop Images Examples via Coordinates and Mouse Selection in the Visual Basic.NET - Examples section.
[ 03/11 - Added 2 new examples for Visual Basic.NET 2002/2003! The two examples are how to crop images. One example shows how to crop images by using specified user input coordinates. The other shows how to crop images by using the mouse to select the coordinates on the image itself! Located in the Visual Basic.NET - Examples section.
[ 03/03 - Put up a new example in the VB.NET - Examples section. The example is how to get the date and time in many different formats and style. Shows how to do it very easily with very little code.
[ 03/03 - Added to this site the csStopWatch Library *Basic* version 1.1. If you have been checking out the www.vbcodesource.INFO site you would have been able to get for a couple weeks now. This Class can be useful for various timing variables. It will return the elapsed time, resolution, reset or no reset and much more. A example of how to use the Class Library is located in the VB.NET - Examples section. The Class Library with source code is located in the VB.NET - Controls section.