Hardcore Visual Basic, Second Edition is targeted at intermediate and advanced programmers who use Visual Basic Professional Edition version 5 to develop applications for Microsoft Windows 95 and Microsoft Windows NT (but not Windows 3.1). That’s the short mission. In fact, the book might prove useful to others as well.
Visual Basic version 5 is actually several languages. Most of it is Visual Basic for Applications, a language introduced in 1993 in Microsoft Excel and Microsoft Project. It is currently available in all other Microsoft Office applications, and is being licensed to other software publishers. Visual Basic is now just another client of Visual Basic for Applications (a very important one) in the same way that Microsoft Excel and Microsoft Word are clients. The language engine is technically separate from the environment. You can see this in the separate VB and VBA entries in the Object Browser.
What does this difference mean to you? It means that if you know Visual Basic, you know Visual Basic for Applications and, to a lesser extent, vice versa. The version number and exact features of Visual Basic for Applications can vary depending on the release date of the application in which it resides, but many of the programming techniques shown in this book will be portable to all VBA-enabled Applications. The line between Visual Basic and Visual Basic for Applications is sometimes fuzzy. You’re on your own in figuring out the differences.
Although I’ve written Hardcore Visual Basic, Second Edition primarily for
users of Visual Basic Professional Edition, owners of two other Visual Basic
products can also use the book. Visual Basic Learning Edition is designed for beginners and has less Windows API documentation and fewer controls. I didn’t test using the Learning Edition, so you’ll have to work out any problems for yourself if you’re one of the few Learning Edition owners who purchases an advanced programming book. Visual Basic Enterprise Edition is a more expensive client/server superset of Visual Basic. Everything I say about Professional Edition also applies to this product, but the enterprise edition has many additional features that I don’t discuss.
You’ll need access to current Windows API documentation to take full advantage of this book. That’s no problem for most readers because the Microsoft Developers Network CD comes with both Professional and Enterprise edi-
tions. If you have the Learning Edition or if you’re using Visual Basic for Applications, you’ll need to find separate Windows API documentation. Microsoft’s Windows API documentation, whether in help files or in books (and now on www.microsoft.com/msdn/sdk), is oriented toward the C language. Figuring out how to use C documentation for Visual Basic programming is one of the topics of this book, but you might want additional help. I’m a great admirer of Dan Appleman’s Visual Basic 5.0 Programmer’s Guide to the Win32 API (Ziff-Davis Press, 1997). This book presents Windows API documentation in Visual Basic format. Appleman covers some of the same material I cover, but with a different slant. I don’t think of his book as a competitor. If you have room on your bookshelf for two advanced Visual Basic books (and if the shelf won’t break under the weight of 1584 pages), Appleman’s book should be the second one.
I wrote Hardcore Visual Basic, Second Edition using two different operating environments—Windows 95 and Windows NT version 4.0. Many of the techniques would work in Windows NT version 3.51, but I had already moved to version 4.0 beta by the time I started writing and so nothing has been tested in the older version. I present many techniques for manipulating the new Windows interface, and you’ll need version 4.0 to test these under Windows NT. Using multiple environments is a difficult business, and if there are bugs in my code (incredible as it might seem), that’s the area where I’d expect to find them.
One more point: this book assumes knowledge of Visual Basic 5 features—classes, collections, properties, optional arguments, OLE servers, add-ins...the list goes on. Version 5 is a major update, and you’ll see a lot of new features. I’m going to be talking about these features as if you already know the basics. There will be no hand-holding or introduction to new features. I try to make my book an additon to the documentation, not a replacement.