- Installation
- First Impressions
- The Design Environment
- VB 2005 Trumps VB 6
First Impressions
Remember the first time you started VB 6? Remember how impressed you were with all the new project templates? It seemed like a wild assortment for those of us used to the meager few in version 4 or 3. We were sure impressed with all those options. VB 2005 continues the VB 2003 assortment with a very friendly first screen (discussed later).
VB 6 sure was busy, though. It seemed to have a cluttered screen. All of those windows lined up on the sides left little room for the form and design. Fast coders learned the shortcut F and Ctrl keys to open those windows at will. But the interface was awkward with the screen sizes and resolutions of the time. Figure 1 shows the old interface at 1024 × 768 resolution—the first size able to provide room for all those windows, in my opinion. Oh, for the good old days of 800 × 600 and creating complex interfaces...
Figure 1 The old cramped feeling.
So how does VB 2005 greet us? It seems similar (see Figure 2). The first screen offers a lot of content. It asks you to wait while the MSDN page loads learning content from Microsoft. Broadband is very recommended. Why, instead of allowing me to code, VB 2005 seems to want to teach me first. This is different from VB 6, which allowed me to begin coding quickly. How is this an improvement over VB 6?
Figure 2 The new cramped feeling.
One of the biggest complaints I heard about VB 6—by others only, mind you—was the "theoretical" nature of VB 6 help. Many felt that it was difficult finding focused information on VB. The examples were very limited, and using them in your code was a cut-and-paste-and-retype operation.
Figure 3 shows an example of the limitations of VB 6 help. I've typed file open in the search facility. I haven't altered the standard window dimensions of my help window. As you review the hits, we both see that it will be a long night of trying to find file open docs relevant to VB 6. I even adjusted my Active Subset to Visual Basic Documentation before the search, so the wild hits are unexpected. Indeed, I didn't install the InterDev help, the C++ help, etc. to cut down on wasted disk space. No, VB 6 help was very complete, but using it well was tough.
Figure 3 So much data, with too little information.
Just what were we looking for in those old help screens? Well, VB coders are known for their need to learn through experimentation. During Microsoft's "Train the Trainer" class, presented to several of us MVPs, we were amazed at the market analysis of VB coders. We're a can-do crew who would rather adapt a code sample than read books on a topic. Microsoft listened. Examine Figure 2 carefully. Look at VB 2005's "Getting Started" section. This version wants to lead you to a working example. Let's open the section "How do I...?"
It's nice to know that Microsoft includes this kind of practical information in their tools. Figure 4 introduces topics you might find instantly interesting. We all know that security is a big question we're all asked to accommodate in our code. Secure design from the beginning and building from secure libraries will shield your code from too many patching events. Look below that and you'll see a great section, "For Visual Basic 6 Users." This section helps you transition without needing to buy another book.
Figure 4 Getting Started Help gives great information from the beginning.
So, without opening Help, we have help. It seems that Microsoft understands the problems with the VB 2002 learning curve; and with VB 2005, was willing to do many things about it. So let's open Help. I posted the same search term (file open) to VB 2005's help, at the general search function of the compiler. Figure 5 lists my results, and I'm impressed. I get VB-specific searches and actual code samples quickly.
Figure 5 Look at those relevant hits!
Wow, that's news I can use. Literally. I open the first hit and scroll down to the sample code, in typical VB coder style. Let's face it; coding is learned from good code. I need to copy this code into my program. Figure 6 shows how easily this is done, via the Copy Code button in the upper-right corner.
Figure 6 Easy writer.
Once I click it, it's an easy matter to paste it into my project. Altering the code to match my needs is made easier in VB 2005. It uses a distinct color for information I must change. And with this, my hunt for opening a file in VB 2005 is made very easy.