O'Reilly logo

Programming Visual Basic 2008 by Tim Patrick

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Visual Studio 2008

Since this is a book on Visual Basic development and not on Visual Studio usage, I won't be delving too much into Visual Studio's features or its user interface elements. It is a great application, and its tight integration with the .NET Framework makes it the best tool for developing applications with .NET. But as the real programmer would tell you, it is really just a glorified text editor. Visual Studio hides a lot of the complexity of .NET code, and its automatic generation of the code needed to build your application's user interface is a must-have. Most of its features exist to simplify the process of adding code to your application.

Although I will not be including a 20-page review of Visual Studio right here, you will find images of Visual Studio throughout the text, placed so as to advance your understanding of the topics under discussion in each chapter. When you start up Visual Studio for the first time, it displays the Start Page. (See Figure 1-6. The screenshots in this book are taken from the Professional Edition of Visual Studio 2008.)

The Visual Studio Start Page

Figure 1-6. The Visual Studio Start Page

Visual Studio 2008 is the fourth major release of the product since .NET's initial introduction in 2002. Each release (in 2002, 2003, 2005, and 2008) corresponds to a related release of the .NET Framework (versions 1.0, 1.1, 2.0, and 3.5, respectively) and of the .NET implementation of Visual Basic. The 2008 release of Visual Studio is major. It is packed with new usability features, and comes in four delicious flavors:

Visual Studio 2008 Express Edition

This entry-level product is geared toward the home hobbyist or weekend programmer who wants to learn .NET and one of its core programming languages, but won't be snuggling up to it on a daily basis. Visual Studio 2008 Express Edition is actually multiple Express Edition language products promoted together, including Visual Basic 2008 Express Edition. Microsoft's goal is to introduce as many people as possible to the joys of .NET programming, so it offers the Express Edition products at no cost. This edition includes a simplified Visual Studio-like user interface, but it does impose a few restrictions on your program-crafting ability. You can still edit the source code directly and craft applications of any complexity, but the Express UI won't always assist you with this. For instance, you cannot develop web applications with the Visual Basic Express product unless you install the separate Visual Web Developer 2008 product. Also, Express doesn't include much support for deployment; applications designed with the Express Edition are generally expected to be used on your own workstation only.

Visual Studio 2008 Standard Edition

Visual Studio's Standard Edition is just like the Express Edition, with a few extras thrown in, such as multiple-language support, web development tools, and deployment support through both ClickOnce and Windows Installer methods. SQL Server 2005 Express Edition is included.

Visual Studio 2008 Professional Edition

This is the minimum level required by programmers who will develop applications on a daily basis for money. It's the version that I use, and it includes all the "power" features needed by a single programmer for both desktop and web-based development. The straightjacketed Express user interface is out, replaced by the full Visual Studio "mighty" Integrated Development Environment (IDE) and all documentation. Also included are special tools that help you develop applications for Microsoft Office, and for mobile devices. But wait, there's more. You also get SQL Server 2005 Developer Edition. All instructions in this book that relate to using the development environment refer to the Professional Edition. But if you are following along using the Express or Standard Edition, you will be just fine since the interfaces are quite similar.

Visual Studio Team System 2008

The crème de la crème of the Visual Studio product line is Team System. It includes features needed by development teams that work on projects together, features such as project management tools and source code control. Visual Studio Team System 2008 Team Foundation Server, a separate product, can be installed on a shared server, and enhances the features of the Team System package.

SQL Server 2008, the latest edition of Microsoft's flagship database product, was officially launched on the same day as Visual Studio 2008. Unfortunately, "launch" had two different meanings depending on which of the products you were talking about. For Visual Studio 2008, "launch" meant you could download the product from Microsoft's web site several months before the launch event. For SQL Server, a mirror was used to allow access to the product a few months after the event. That difference was enough to prevent SQL Server 2008 from being the database version bundled with Visual Studio. But you do get SQL Server 2005 in your Visual Studio goodie bag, and you can always upgrade if needed.

Beyond the database support, Visual Studio 2008 has been endowed with several new usability and feature enhancements:

LINQ-specific features

We'll discuss the new LINQ feature in Chapter 17. Beyond the code changes added to .NET to support LINQ, Visual Studio includes special designers that assist you in programming with LINQ.

Support for Windows Presentation Foundation projects

Windows Presentation Foundation, formerly code-named Avalon, is a new XML-based user interface system supported by Windows for both desktop and web-based applications. Visual Studio 2008 lets you create WPF-based application or control projects. This book discusses Windows Presentation Foundation briefly in Chapter 18.

Improved HTML (web page) editor

The new HTML editor improves on the previous editions found in earlier releases of Visual Studio. The 2008 release includes a "split view" editor showing HTML and WYSIWYG views simultaneously (see Figure 1-7). Cascading Style Sheets (CSS) finally get their due with a new CSS style editor and IntelliSense support for CSS content.

Have it both ways: HTML markup and display

Figure 1-7. Have it both ways: HTML markup and display

Targeted library support

Earlier releases of Visual Studio were closely tied to the related release of .NET. Visual Studio 2008 continues that tradition through its association with version 3.5 of the .NET Framework. However, you can now target earlier versions of .NET (back through version 2.0) in Visual Studio 2008 with just the click of the mouse.

Enhanced debugging support

Visual Studio 2008 includes better support for remote debugging, especially on Windows Vista. But the most amazing of the new debugging features is the ability to step into the source code for the .NET Framework libraries, with Visual Studio dynamically obtaining the right version of the source code based on your project type and framework version.

Transparent IntelliSense

IntelliSense is a productivity tool that helps speed you along in your code-crafting frenzy. But sometimes the IntelliSense windows that popped up would obscure your source code. Visual Studio 2008 now lets you look through the IntelliSense list window just by holding down the Ctrl key (see Figure 1-8).

Seeing right through Visual Studio's tricks

Figure 1-8. Seeing right through Visual Studio's tricks

JavaScript IntelliSense and debugging support

Although Visual Studio once claimed amnesia concerning Java and JavaScript, it now fully embraces the latter. This enhanced JavaScript environment simplifies the creation of new Ajax applications. While not specifically needed for Visual Basic, this new support is a big plus for those who develop web-based applications.

Despite all these great new features, Microsoft still refuses to implement the most requested Visual Studio feature, Procedure AutoCompletion, in which Visual Studio would create the entire content of a source code procedure based on your entry of its name and the use of the Ctrl-Space bar key combination. Instead, Microsoft fritters away its time on other so-called productivity features. With Procedure AutoCompletion, you could write entire applications in minutes. Until that feature becomes available, you and I will have to continue writing software, crafting the quality code that users have come to expect from our fingers.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required