{ End Bracket }

Around the World with Visual Basic

Jay Roxe

Contents

How the Heck Do You Do That?
What's the Best Way to Take Advantage of Visual Basic 6.0 Code?

The Visual Basic team at Microsoft has spent much of the past eight months out on the road as a part of the Visual Basic® .NET User Group Tour 2004. We've had a chance to visit 13 user groups in the U.S. and Canada, another 12 in Europe, and 9 in Asia and India. Some of the best memories include the 3-hour presentation in Portland that kicked off the tour, fielding questions from 300 people in California, and hanging out with developers until 1 A.M. in Croatia. For some photos from the tour, check out the Web site at Visual Basic World Tour.

In every city we've visited, developers have not been shy about asking questions. After hearing similar questions asked in different groups, I decided there must be more people out there with the same questions, so I want to take this opportunity to answer two of the most common ones.

How the Heck Do You Do That?

Over the years, we've had many people approach us wondering how we implemented a particular feature or control. As a part of this User Group Tour we've been demonstrating the Visual Basic Power Pack. This is a set of seven new controls that enhance your ability to create powerful user interfaces for your client development. It includes controls such as a BlendPanel that makes it easy to use a gradient fill, a NotificationWindow that allows you to add pop-ups (much like an instant message) to your application, and a Utility Toolbar that easily creates a user experience similar to the Microsoft® Internet Explorer toolbar. To answer the question about how we implemented these controls, we've made the source code for the Power Pack controls available under a Shared Source license agreement and put them into a GotDotNet workspace. For those of you unfamiliar with this agreement, it allows you to see the source and contribute modifications back to the community. By the time you read this, we will also have made the code for IssueVision, the very popular Smart Client sample application from DevDays 2004, available on GotDotNet.

I encourage you to take a look at the code, play with it, use it in your apps, modify it, and share it with others. Hopefully you'll be able to take advantage of some of the things we did right, and you'll send us corrections for anything we got wrong! Releasing sample code on GotDotNet is always a bit of an experiment. If we find a dynamic community forming around this, we'll add more code later. You'll need to let us know what type of code you want to see. You can find information about both the Visual Basic Power Pack and IssueVision at the Visual Basic Developer Center.

What's the Best Way to Take Advantage of Visual Basic 6.0 Code?

Many of the developers who saw us during the tour were curious about the best ways to leverage their existing Visual Basic 6.0 code base and ease the migration to Visual Basic 2005. One of the new features that will definitely help leverage existing assets is Registration-Free COM. This allows you to use COM objects without having to register them on the local machine—just use ClickOnce or XCopy deployment to get your program to any machine running Windows® XP. It's a great way to overcome the headaches you get when deploying apps that use COM components. It works for ActiveX® controls, but it can also work with nonvisual business objects. Not all COM components are suitable (add-ins and out-of-proc servers don't work), but this makes it fundamentally easier to reuse your existing COM controls as a part of your Visual Basic solution. With a couple of minor limitations, this works in the beta version of Visual Studio 2005.

In addition to the new product features, we've invited some enterprise customers with large apps built on Visual Basic 6.0 into one of our migration labs and we've worked with them to start the migration process. We're exploring ways to make the content that we present in those labs more widely available. Here are two of the most interesting observations to come out of these migrations:

  • Choose a particular piece of your application to migrate first. It doesn't matter if this is a horizontal or vertical slice of the application, but just migrate one piece and use the rest of the application through COM interop.
  • Use the Visual Basic 6.0 Code Advisor. This is a free Visual Basic 6.0 plug-in that makes suggestions on how to modify your code so that your migration is more successful. Sometimes fairly minor fixes can make a big difference.

To find a user group in your area, see the International .NET Association at www.ineta.org. Hope we'll see you out on the road soon!

Jay Roxe is the Product Manager for Visual Basic at Microsoft where he is responsible for product planning, technical evangelism, and external communication. Prior to this role, Jay was a developer and development lead on the .NET Framework.