ISSUE #2070

    Constant 1% was not upgraded.

    Description

    Some constants may not have a direct equivalent in .NET or may not be mapped to a given equivalent in the current release of the VBUC

    Recommendations

    There is no straightforward solution for this issue because some class properties may not have an equivalent in .NET at all.

    The entire not-mapped set of elements requires manual implementation of the missing member. The stub generation feature will assess the manual effort needed to reach functional equivalence by isolating all not-upgraded class properties in a single source file.

    For more information please refer to Stub generation.

    Also be sure to check the latest MSDN documentation on Windows Forms Controls for Visual Basic 6.0 Users.

    Sample VB6

    Public Sub ConstantNotUpgraded()

    MsgBox VB.Global.App

    End Sub

    Target VB.NET

    PublicSub ConstantNotUpgraded()

    'UPGRADE_ISSUE: (2070) Constant App was not upgraded.

    'UPGRADE_WARNING: (1068) VB.Global.App of type VB.App is being forced to String.

    MessageBox.Show(CStr(UpgradeStubs.VB_Global.getApp()), Application.ProductName)

    EndSub

    Expected VB.NET

    Title is the default property for the App object.

    PublicSub ConstantNotUpgraded()

    MessageBox.Show(Application.Title, Application.ProductName)

    EndSub

    Target C#

    publicvoid ConstantNotUpgraded()

    {

    //UPGRADE_ISSUE: (2070) Constant App was not upgraded.

    //UPGRADE_WARNING: (1068) VB.Global.App of type VB.App is being forced to string.

    MessageBox.Show((string) UpgradeStubs.VB_Global.getApp(), Application.ProductName);

    }

    Expected C#

    Title is the default property for the App object.

    publicvoid ConstantNotUpgraded()

    {

    MessageBox.Show(Application.Title, Application.ProductName);

    }


    Download VBUC Free Trial
    Download VBUC Now

    It's time to eradicate VB6
    ROI of eradicating VB6

    8 Proven Tips for
    Planning a Successful Migration

    8 Tips for migration