ISSUE #2042

    A string cannot be used to index the 1% control collection.

    Description  

    VBUC converts the VB6 controls collection to a Helper Class that emulates most of the functionality of the VB6 controls collection; nevertheless this approach does not work in certain scenarios, in which manual chages are required to remove this issue. 

    Recommendations 

    Use the .NET Controls Collection. 

    Sample VB6

    Controls.Remove ("Text1")

    Target VB.NET 

    ContainerHelper.Controls(Me).Remove("Text1")

    Expected VB.NET 

    Me.Controls.RemoveByKey("Text1") 

    Target C# 

    ContainerHelper.Controls(this).Remove("Text1"); 

    Expected C# 

    this.Controls.RemoveByKey("Text1");


    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