ISSUE #1039

    Load statement is not supported

    Description 

    Some functions that were used in VB6, such as Load and Unload, are not directly available in .NET and are therefore not converted by VBUC. 

    Recommendations 

    Use a .NET equivalent function (Show or ShowDialog) of the Form class in order to make the code compile and run.

    Sample VB6 

    Dim tempform As Form2
    Set tempform = New Form2
    Load tempform
    tempform.Visible = True

    Target VB.NET 

    Dim tempform As New Form2
    'UPGRADE_ISSUE: (1039) Load statement is not supported.
    Load(tempform)
    tempform.Visible = True

    Expected VB.NET 

    Dim tempform As New Form2
    tempform.ShowDialog()

    Target C# 

    Form2 tempform = new Form2();
    //UPGRADE_ISSUE: (1039) Load statement is not supported.
    Load(tempform);
    tempform.Visible = true;

    Expected C# 

    Form2 tempform = new Form2();
    tempform.ShowDialog();


    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