As I mentioned in the blog intro, XTreme had a history of publishing Visual Basic tips as part of the main site. I recently decided to revamp entirely, as the stale odor coming from the site overwhelmed me. Went down to a bare bones main page and left nothing linked from it until I could update further (that is, got around to updating further). Outside of search engines that still show them, if not ranked as highly as they once were, they aren’t linked anywhere. If you’ve moved along to VB.NET, some may no longer apply, but they work for some or all of the older versions of VB from 3.0 (for some of the basics) through 6.0. They are all linked in this post, just to get them out there again. Some may yet be reproduced entirely in posts here. Any new tips, Visual Basic or otherwise, will go here in the blog. The beauty of blogging software is that it’s so much easier to have a tip idea, write it, post it, correct it if needed, and receive feedback. But this isn’t a post on why blogging is a great tool. Here they are:
Fun With Textboxes – a basic tip with code for doing this and that in a VB textbox, with a picture of the result and a link to the VB5 project. Simple as it is, this has been one of the most popular tips. This is going to take forever if I describe each one, so forgive me if I’m terse for some of it.
Using Control Arrays To Your Advantage – another super simple tip that has gotten some of the highest traffic of all the VB tips. It can be easy to lose sight of the need for beginner info to be available if you are not one yourself. The next four are also quite popular, each one a database tip oriented toward VB6.
Example of Updating a Foxpro Table Via ODBC Direct Returning Recordcount with ADO
Closing, Reopening and Rebinding with DataEnvironment Example of Opening and Closing Recordset, then Opening a Different Table with the DataEnvironment
More database-related tips:
How to open an ODBC Direct Work Space and create an updatable recordset
Generating Output of Database Structure
Other tips and code samples:
Automation of MSN Messenger from VB Code – This is obsolete, but may provide ideas. Microsoft upgraded Messenger shortly after this was posted, changed the object model and broke compatibility with this code.
The next one was the result of a tip request from someone who’d seen the other tips on the site. We eventually figured out it was probably a homework assignment, and the guy hassled us for more and more help so that it would match more precisely the specs of his assignment. Idea for a tip, good. Harassment and being lazy, bad. Example of Determining Change Denominations in Visual
VB Add-In to Close All Code Windows
The next two were the result of the entire concept of finding factors and testing primes sort of “coming to me” in a grokkish rush. The tip for primes is the crudest, slowest method, and I challenge people to go from there and determine the better ways. Thus it shows what it shows, but may not be exactly what you want in a program that matters.
How to Determine the Factors of a Specified Number in Visual Basic Code
How to Determine Whether a Specified Number is Prime Visual Basic Code
VB6 Bug Using Printer.Scale to Print a Graph
How To: Launch Windows Control Panel Extensions Using VB
How to Determine Drive Size and Available Space Even On Huge Drives
Restart App At Windows Startup
Reading the lines of a multiline textbox into the an array
One way to determine whether a specific year is a leap year…
Use Object Browser and Class Wizard
This next one was online for a couple years before I discovered the original code had a minor bug that kept it from working exactly as intended. Oops… How to to tile a picture on a form
On instancing and naming
There you have it, the original collection of XTreme Computing VB tips from days gone by.