|
-
May 22nd, 2008, 10:10 AM
#1
Thread Starter
Addicted Member
[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?
If my post helped you, please rate it!
Languages: VB/ASP.NET 2005, C# 2008,VB6
Databases: Oracle (knowledge not currently in use), DB2
FROM Customers
WHERE We_Know_What_We_Want <> DB.Null
SELECT *
0 rows returned
-
May 22nd, 2008, 11:00 AM
#2
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.
-
May 22nd, 2008, 11:06 AM
#3
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.
My usual boring signature: Nothing
 
-
May 22nd, 2008, 11:17 AM
#4
Thread Starter
Addicted Member
Re: [2005] Scratch it or use Converter?
 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.
If my post helped you, please rate it!
Languages: VB/ASP.NET 2005, C# 2008,VB6
Databases: Oracle (knowledge not currently in use), DB2
FROM Customers
WHERE We_Know_What_We_Want <> DB.Null
SELECT *
0 rows returned
-
May 22nd, 2008, 01:58 PM
#5
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
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|