locked
Convert vb6 to vb.net RRS feed

  • Question

  • User-2139588017 posted

    Hi Guys,

    Can I convert visual basic 6 project to visual baisc .Net

    Thanks

    Tuesday, February 7, 2012 4:05 PM

Answers

  • User1084963946 posted

    Check following link. It has proper explanation as well

    http://social.msdn.microsoft.com/Forums/en/vbinterop/thread/8709a99b-e124-453e-bcf3-46d03deadc64

    1.    How to upgrade VB6 project to VB.NET project?

    The Upgrade tool that is included with Visual Basic .NET.

    This happens automatically when you open a Visual Basic 6.0 project in Visual Basic .NET: the Upgrade Wizard steps you through the upgrade process and creates a new Visual Basic .NET project (your existing project is left unchanged). This is a one-way process; the new Visual Basic .NET project cannot be opened in Visual Basic 6.0.

    When your project is upgraded, the language is modified for any syntax changes and your Visual Basic 6.0 Forms are converted to Windows Forms. In most cases, you will have to make some necessary manual adjustments until the code is compliable after it is upgraded. This is required because certain objects and language features either have no equivalent in Visual Basic .NET, or have an equivalent too dissimilar for an automatic upgrade. After the upgrade, you may also want to change your application to take advantage of some of the new features in Visual Basic .NET.

     

    Some tutorial:

    http://msdn.microsoft.com/en-us/library/aa260644.aspx

    http://support.microsoft.com/default.aspx/kb/309617/en-us

     

    2.    You receive an error message "You do not have a license to use this control" when you use VB6 controls in Visual Studio .NET or after upgrading VB6 to VB.NET?

    When you upgrade a VB6 project that contains VB6 ActiveX controls, or when you try to use VB6 ActiveX controls in Visual Studio .NET, those controls must be installed and licensed on the target system. But Visual Studio .NET don’t install the license information for Visual Basic 6.0 ActiveX controls.

    To resolve this problem, you must install the .ocx files for the ActiveX controls on the computer. Use one of the following methods:

    1)    Install Visual Basic 6.0 on the computer that is running Visual Studio .NET.

    2)    Add the licensing keys to the registry.

     

    Detail KB article: http://support.microsoft.com/kb/318597/en-us

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 10, 2012 11:15 AM

All replies

  • User-1199946673 posted

    I never tested this myself, but take a look here:

    http://www.visualwebgui.com/tabid/661/Default.aspx

    Tuesday, February 7, 2012 4:33 PM
  • User497476629 posted

    visual studio has a convertor, but it is not perfect and will not be able to convert all the code

    Tuesday, February 7, 2012 4:50 PM
  • User-1995371670 posted

    The entire programming paradigm has change along with the syntax, semantics and the like since the migration from VB6 to .NET. So much, so that it is near impossible to convert any complex project as it is. The wizard may seem to do a trick, but it works only for smaller projects where the .NET equivalent classes/functions are straight-forward.

    But in case you have used event binding, windows API calls, ADO/RDO database stuff or crystal reports, its obvious that you have to rewrite a major portion of your project. Some things like crystal reports and the old RDO objects just don't have straight-forward equivalents in .NET.

    Thursday, February 9, 2012 10:17 PM
  • User1084963946 posted

    Check following link. It has proper explanation as well

    http://social.msdn.microsoft.com/Forums/en/vbinterop/thread/8709a99b-e124-453e-bcf3-46d03deadc64

    1.    How to upgrade VB6 project to VB.NET project?

    The Upgrade tool that is included with Visual Basic .NET.

    This happens automatically when you open a Visual Basic 6.0 project in Visual Basic .NET: the Upgrade Wizard steps you through the upgrade process and creates a new Visual Basic .NET project (your existing project is left unchanged). This is a one-way process; the new Visual Basic .NET project cannot be opened in Visual Basic 6.0.

    When your project is upgraded, the language is modified for any syntax changes and your Visual Basic 6.0 Forms are converted to Windows Forms. In most cases, you will have to make some necessary manual adjustments until the code is compliable after it is upgraded. This is required because certain objects and language features either have no equivalent in Visual Basic .NET, or have an equivalent too dissimilar for an automatic upgrade. After the upgrade, you may also want to change your application to take advantage of some of the new features in Visual Basic .NET.

     

    Some tutorial:

    http://msdn.microsoft.com/en-us/library/aa260644.aspx

    http://support.microsoft.com/default.aspx/kb/309617/en-us

     

    2.    You receive an error message "You do not have a license to use this control" when you use VB6 controls in Visual Studio .NET or after upgrading VB6 to VB.NET?

    When you upgrade a VB6 project that contains VB6 ActiveX controls, or when you try to use VB6 ActiveX controls in Visual Studio .NET, those controls must be installed and licensed on the target system. But Visual Studio .NET don’t install the license information for Visual Basic 6.0 ActiveX controls.

    To resolve this problem, you must install the .ocx files for the ActiveX controls on the computer. Use one of the following methods:

    1)    Install Visual Basic 6.0 on the computer that is running Visual Studio .NET.

    2)    Add the licensing keys to the registry.

     

    Detail KB article: http://support.microsoft.com/kb/318597/en-us

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 10, 2012 11:15 AM