Click here to Skip to main content
15,120,814 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I need to convert the vb6 code to c# . So can i get some online converter for this.

What I have tried:

I tried to find out the online converter for vb6 to c# but could not get it.

Can i directly convert vb6 to C# ? Or Do I need to convert first convert vb6 => vb.net => c#??
Posted
Updated 26-Jan-19 5:32am
Comments
lmoelleb 27-Nov-18 3:33am
   
Option 1: The code is valuable enough to migrate it to proper C#. This can't be done by any copy-paste converter. Option 2: The code is not worth anything, throw it away.

Basically speaking, it's probably a bad idea.
While it's possible, what you end up with is not good .NET code - it's VB6 code that happens to run as C#.

There are huge differences in paradigm between VB6 and VB.NET, and while there are - or were, I haven't looked for ages - VB6 to VB.NET convertes, IIRC they left a whole load of stuff t5hat you had to manually fix up anyway.

I'd strongly suggest that you use the VB6 code as a specification for a brand new C# application - that way you end up with a modern app that is maintainable for the future and which can use modern concepts instead of a hacked about abortion based on 15 year old software design ...
   
Comments
CHill60 27-Nov-18 4:24am
   
I wholeheartedly agree!
@User-14068476 ... I've seen this attempted and the resulting mess was a complete and utter waste of time and effort (and did not work very well). On top of all that, there are much nicer ways of presenting a UI then mimicing the old VB6 styles. The phrase "use the VB6 code as a specification" is absolutely the best advice you can receive on this subject!
Treat the VB code as your spec and duplicate the functionality in C#. That is the only way. Since it is VB code you will probably find ways to improve it as you go along :)
   
Older versions of Visual Studio had an option to convert VB6 code, but I don't know if it is still supported. It's probably only possible for the simplest of applications.
More information here: On Migrating a VB Project to VB.NET[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900