To convert VB6 code to VB.NET you simply open your vbp project file in VB.NET and the conversion wizard should then start.
However, having said this, it is usually better to re-write your project as the conversion code invariably requires a lot of work to get working and it also uses the Visual Basic compatibility layer which means that your code will still make use of a lot of VB6 syntax which doesn't teach you how to do things properly in .NET.
If you are new to VB.NET then I seriously recommend that you take a small project and re-write it as it will help you later when trying to convert larger projects.
HTML:
2) Also is VB6 and VB.NET multi-lingual
Not quite sure what you mean here, but if you are asking if the syntax in VB.NET and VB6 are similar then I would say that they are when using the Visual Basic compatibility layer. But once you start doing things the ".NET way" you will see that the syntax is quite difference.
For example, in VB6 you might use the Mid statement to grab string contents, whereas in VB.NET you would use the SubString method of the String object. Likewise, converting a string to a Long would require use of the CLng function in VB6, whereas in VB.NET you would make use of the casting methods such as CType and DirectCast.
There is an uprade wizard included with .Net 2005, however from what i've heard it can be more trouble than it is worth. In most cases i've heard about it is worthwhile just re-writing the whole thing, that may not be what you wanted to hear though.
EDIT: Looks like djjeavons beat to the button there But just one thing to add. When converting types like the example djjeavons mentioned, it is worthwhile using the Convert Class i.e..
VB.NET:
Dim I as integer = Convert.ToInt32(Some string)
Much faster than using the inline statements such as CInt, CStr etc...
Also there are other methods, that maybe a bit 'safer' such as Integer.TryParse etc...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.