VB to .NET

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 VB6 AI Migrator. 

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();

Talk To An Engineer