[2005] Scratch it or use Converter?
Mods, feel free to move this thread. I didn't know whether to put it here or in the vb6 forum.
I am currently upgrading a VB6 application to .Net.
I tried using the converter, just for giggles, and I have A LOT of adjustments to make to get the program functioning properly in .Net. So, scratch it and start over right?
The caveat is that there is a lot of code that I will be able to reuse. I say somewhere in the neighborhood of 80% of the code will be able to be used again. I'd say around 70% of that will be able to be used as is. So, following the percentage, it would seem that just converting and fixing would be the way to go.
I'm at a crossroads here. When I really think about it, the best thing for me to do would probably be start from scratch, and just use good ol' copy and paste for the vb6 code that works already.
Any thoughts from people that have already converted vb6 projects to .net?
Re: [2005] Scratch it or use Converter?
Since you're getting into .NET, convert it and rewrite the parts that don't work. It takes about a solid year to really change to the .NET mentality from VB6. You'll be re-writing major blocks of your working code as you discover those better .NET methods for doing things.
Then, when you are faced with the challenge of upgrading ANOTHER application to .NET, you'll have a much stronger knowledgebase and doing it from scratch would yield better results regardless.
Of course, if you're already good with .NET, I'd do as you suggest. Start from scratch and cut-paste through the VB6 to VB.NET converter for functionblocks that don't require much rework.
Re: [2005] Scratch it or use Converter?
Start over....sort of. If you have functions that will work fine, you can cut and paste them from VB6 to the .NET project. How those functions integrate into the new project is what you will be writing fresh, along with those pieces that can't be copied. For example, if you need a button, and the button click code is working fine, select the button click code from VB6, hit Ctrl+C, add a button to the new project at the right place, name it, etc., then double click to get the button click event handler outline, and paste in the copied code. You get the new program, but you get it much faster than you would if you had to re-write from scratch a bunch of low level stuff. I moved a medium sized program from VB6 to .NET in a couple days doing this.
Re: [2005] Scratch it or use Converter?
Quote:
Originally Posted by Jenner
Of course, if you're already good with .NET, I'd do as you suggest. Start from scratch and cut-paste through the VB6 to VB.NET converter for functionblocks that don't require much rework.
I wouldn't say I'm "good" with .Net (college grad at first job), but I'm a lot better with it than VB6.
I appreciate the suggestions. I already started the "ground-up" approach, and have accomplished more in a couple of hours than I did in a whole day trying to fix the vb6 code that didn't work in .Net.
Re: [2005] Scratch it or use Converter?
I would vote for rewritting as you get a chance to optimize your code and learn .net more that way. But if time is an issue you can take a partial migration approach by using the Forms Toolkit.
http://msdn.microsoft.com/en-us/vbasic/bb419144.aspx