Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 8th, 2009, 08:55 AM
Registered User
 
Join Date: Sep 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Converting VB6 code to VB2008

I just installed in my computer Microsoft Visual Studio 2008, with it of course if Visual Basic 2008. I have lots of VB6 programs which I would like very much to convert/upgrade to VB 2008. This programs all use the 3-tier setup. How do I go about it?

Will someone please help me?

Thanks a lot guys.

gorio
 
Old November 8th, 2009, 12:52 PM
Authorized User
 
Join Date: Mar 2009
Posts: 49
Thanks: 0
Thanked 8 Times in 8 Posts
Default

Start a new project and goto help>how do I. The second link down should be (Upgrade For Visual Basic 6 Users (How Do I in Visual Basic).

Have fun



Good Luck
 
Old November 8th, 2009, 08:41 PM
Registered User
 
Join Date: Nov 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Upgrading VB6 to VB2008

There are many sites and articles -- even a 500+ page book from MSFT -- describing how to migrate and the challenges you will face. There are also about a dozen companies offering converters of different quality of output. But make no mistake: if you are going to migrate and ultimately maintain an application in .NET you (or your team) must learn .NET and learn it well. Before you start the upgrade, it is important to know .NET well enough that you can formulate a clear vision of how you want your application to work once it is in .NET: you have to have a good idea of where you are going before you try to get there.

Most people say "conversions do not work", so you have to "just rewrite it". Unfortunately, "rewrite" can mean just about anything, so advice to "just rewrite it" is not very helpful. Furthermore, if the application is large and complex, a rewrite will be a long, hard road and you may run out of gas before reaching your destination. Large applications have typically emerged over dozens or hundreds of person-years of development and contain thousands of intricate logic blocks, dozens of forms, and mountains of database access code that specifies the actual requirements of the application. A "Rewrite" means you will attempt to reproduce this massive specification from scratch and implement it in .NET code mostly by hand.

"Convert", on the other hand, means you admit that you can/must leverage the existing code and rather than spending time re-gathering functional specs and doing very-low-level design, you will take your working production code and put it through a process that systematically produces .NET project(s) based on your code and on your decisions for how to deal with platform differences.

The initial output of a conversion will rarely if ever build; it will also contain many subtle and not so subtle bugs; and with few exceptions, it will not take advantage of the new components and best practices of .NET. However, the converted code will be a complete, consistent .NET version of your application. It will be a familiar set of projects, forms, classes, modules, methods, and variables. This familiarity will be a great benefit to you when are debugging and fixing, and ultimately maintaining the .NET code. Also, the entire .NET codebase will be accessible through VisualStudio and many other .NET tools. VisualStudio in particular is an extremely powerful environment for analyzing, debugging, and refactoring large complex codebases and it is perfectly suited for what you must do next:

1) Iteratively debug and fix the conversion until you get to build. As you are working through this process, I recommend you keep track of the areas you plan on refactoring.

2) Begin running the app then debug and fix the conversion to address runtime exceptions. As with build issues, you keep track of the areas you plan on refactoring. I recommend you get the entire app to a point where it runs and is testable except for areas you are plan to refactor.

3) Finally comes the fun part: you fix functional defects and refactor the codebase by doing things like replacing COM components with .NET classes, and reworking your application to take advantage of .NET platform features.

One thing to beware of is that for a very large codebase, your initial translation will require a boat load of debugging and fixing and this could mean a massive amount or error prone, often tedious hand coding. However, when I said fix and refactor the conversion above, I did not mean do it all by hand. On the contrary, I meant fix the conversion process itself so that it produces more correct, refactored code that requires less and less manual fixing and refactoring. This of course means you must be using a conversion tool that can be configured to produce different (i.e. improved) outputs. These next-generation customizable translation/reengineering tools allow you to iteratively improve the translation process, and with each iteration, produce code that requires less manual work to finish. GreatMigrations has configurable translation tools like this.





Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO VB2008: VB6 ActiveX /WebBrowser Philibuster Visual Basic 2008 Essentials 1 August 11th, 2008 09:59 PM
Converting VB6 DLL call to asp.net rrhandle General .NET 0 April 14th, 2007 02:37 AM
Converting VB6 classes to VB.NET (2003) jorgefejr VB How-To 2 August 25th, 2006 05:09 PM
Converting int64 data type in VB6 yeeck VB How-To 1 December 9th, 2003 10:13 PM
Converting int64 data type in VB6 yeeck Beginning VB 6 0 November 27th, 2003 11:32 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.