White Papers

The new Science of Information Security

Planning for a Data Migration Project

Is Offshoring for you?


Useful Links

Glossary of Internet and Web Jargon

Guide to Hosting Industry Jargon

Search Engines: A comparison

How to use Subject-Focused Directories

Web graphics resources
Template Samples

The Village Quarterly Magazine of the Arts

Upgrading VB 6 to .NET
Other Considerations Resources
  1. We recommend that you use the OpenFileDialog and SaveFileDialog components to provide access to the file system; however, if you find it necessary to create your own file dialog boxes, Visual Basic 2005 provides DirListBox, DriveListBox, and FileListBox controls as part of the Microsoft Visual Basic Compatibility Runtime library.

  2. Components compiled with Visual Basic 2005 have subtle run-time differences compared to components compiled with Visual Basic 6.0. Because Visual Basic 2005 objects are released through garbage collection, when objects are explicitly destroyed, there may be a lag before they are actually removed from memory. There are additional differences, such as data type and other language changes. The combined result of these differences is that Visual Basic 2005 applications will have similar but not identical run-time behavior to Visual Basic 6.0 applications.

  3. When a WebClass project is upgraded, by default the project is created with a new project name of projectname.NET (where projectname is the name of the Visual Basic 6.0 project).

When a Visual Basic 6.0 WebClass project is upgraded to ASP.NET, the .asp file for the project is upgraded to an .aspx file. Any references to the .asp file within an HTML template file are not automatically changed to .aspx references. These are not upgraded because a template file might contain references to other .asp files that were not part of the WebClass project.
In addition, when files are copied to the new project directory during upgrade, only HTML template files are copied. Any other .html files or image files are not copied to the new directory.

When you add HTML files to an ASP.NET Web Site project, they are added as Content files by default. When a WebClass project is upgraded, HTML files are added as Embedded Resources. If you add HTML Files to the project after upgrading, you must set their Build Action property to Embedded Resource in order to make them visible to the application.

  1. Cannot Access Help Links After Upgrading Visual Studio

When working with an application upgraded with an earlier version of Visual Studio, the Help links inserted by the upgrade tool may cause a "Page not found" error. This occurs because the links reference the Help collection for the earlier version, and the format for the Help links have changed.
To fix this problem, you can copy the error string and use the Search function in Help to find the topic. Note that some error strings include variables, so you may need to search on a partial string.

  1. Behavioral Difference for Fixed-length Strings in User-defined Types

In Visual Basic 6.0, strings assigned to a fixed-length string in a user-defined type are automatically truncated if they are longer than the fixed length. After upgrading to Visual Basic 2005, strings are no longer truncated, possibly resulting in incorrect results.

During upgrade, the VBFixedString attribute is added to fixed-length strings in user-defined types. This attribute allows the file functions in the Visual Basic Compatibility library to treat them as fixed-length strings.
To fix this problem, find any code that assigns a string to the fixed-length string and add code to check the length of the string and truncate it if necessary:

  1. Closing a Form Calls Dispose

    In Visual Basic 6.0, you can unload a form and later reload it by calling the Show method. In Visual Basic 2005, the Close method for a form calls the Dispose method so that it is automatically garbage-collected. This can cause subtle behavioral differences that may be hard to detect.

    • In Visual Basic 2005, if you call the Show method for a form that has been unloaded, you will get a new instance of the form; any property settings from the base class will be lost.

    • For forms that are shown modally, Dispose is not called automatically. In some cases, you may want to call Dispose in order to clean up resources.

  2. Late-bound Calls to COM Objects May Cause Type Mismatch Error

    In Visual Basic 6.0, when a late-bound COM object is passed as a parameter to a late-bound call, the object is coerced to a Variant of type Nothing. When upgraded to Visual Basic 2005, COM objects declared as type Object are treated the same as Variants (which are always converted to type Object during upgrade); these objects are marshaled to the variant type Empty. This causes a type mismatch error in Visual Basic 2005.

    To fix this problem, make sure that all objects are early bound.

  3. Values Returned by Err.Number May Be Different

In some cases, errors returned by Visual Basic 2005 may be different than those returned by Visual Basic 6.0. For error handling code that relied on the values returned by Err.Number, this might cause different behavior in your application.

If you depend on the return values from Err.Number in your code, you should carefully test the results and modify your code as necessary.


MS VB 6 Upgrade Home

VB 6 Upgrade Assessment Tool

How to: Add Visual Basic 6.0 File System Controls to Your Application

VB 6 to .NET Upgrade BLOG

Help for VB 6 Users

MS Interop Forms Toolkit

Office Development with Visual Studio

Upgrading to VB 2008

Online Networking and Assoc. Inc.   dennis@onlinenetworking.org