BYTEINSIGHT
GAPVelocity AI Studio helps you move from outdated tech stacks to the latest desktop, web, and cloud platforms—smarter, faster, and with less risk.
Choose a platform to see migration options:
Our comprehensive approach to application modernization, from assessment to production deployment.
Transformation Services
Not Sure Where to Start?
VB6 AI Migrator converts MDI forms to regular .NET forms, but also applies specific conversion rules in order to emulate exactly the same behavior as in VB6. If that behavior is no longer wanted, then just remove the tagged comment and the line of code that calls the Show method of the form.
If the MDI form in the VB6 project had its AutoShowChildren property set to True; to simulate the VB6 behavior, VB6 AI Migrator needs to automatically show the form whenever it is loaded.
If you do not want this behavior then delete the following lines of code:
//UPGRADE_TODO: (2018) Remove the next line of code to stop form from automatically showing.
this.Show();
Private Sub MDIForm_Load()
Form1Child.Show
End Sub
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'This form is an MDI child.
'This code simulates the VB6
' functionality of automatically
' loading and showing an MDI
' child's parent.
Me.MdiParent = Project1.MDIForm1
Project1.MDIForm1.Show()
'The MDI form in the VB6 project had its
'AutoShowChildren property set to True
'To simulate the VB6 behavior, we need to
'automatically Show the form whenever it
'is loaded. If you do not want this behavior
'then delete the following line of code
'UPGRADE_TODO: (2018) Remove the next line of code to stop form from automatically showing.
Me.Show()
EndSub
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'This form is an MDI child.
'This code simulates the VB6
' functionality of automatically
' loading and showing an MDI
' child's parent.
Me.MdiParent = Project1.MDIForm1
Project1.MDIForm1.Show()
'The MDI form in the VB6 project had its
'AutoShowChildren property set to True
'To simulate the VB6 behavior, we need to
'automatically Show the form whenever it
'is loaded. If you do not want this behavior
'then delete the following line of code
'UPGRADE_TODO: (2018) Remove the next line of code to stop form from automatically showing.
Me.Show()
EndSub
public Form1Child()
:base()
{
if (m_vb6FormDefInstance == null)
{
if (m_InitializingDefInstance)
{
m_vb6FormDefInstance = this;
}
else
{
try
{
//For the start-up form, the first instance created is the default instance.
if (System.Reflection.Assembly.GetExecutingAssembly().EntryPoint != null && System.Reflection.Assembly.GetExecutingAssembly().EntryPoint.DeclaringType == this.GetType())
{
m_vb6FormDefInstance = this;
}
}
catch
{
}
}
}
//This call is required by the Windows Form Designer.
InitializeComponent();
//This form is an MDI child.
//This code simulates the VB6
// functionality of automatically
// loading and showing an MDI
// child's parent.
this.MdiParent = Project1.MDIForm1.DefInstance;
Project1.MDIForm1.DefInstance.Show();
//The MDI form in the VB6 project had its
//AutoShowChildren property set to True
//To simulate the VB6 behavior, we need to
//automatically Show the form whenever it
//is loaded. If you do not want this behavior
//then delete the following line of code
//UPGRADE_TODO: (2018) Remove the next line of code to stop form from automatically showing.
this.Show();
}
public Form1Child()
:base()
{
if (m_vb6FormDefInstance == null)
{
if (m_InitializingDefInstance)
{
m_vb6FormDefInstance = this;
}
else
{
try
{
//For the start-up form, the first instance created is the default instance.
if (System.Reflection.Assembly.GetExecutingAssembly().EntryPoint!= null && System.Reflection.Assembly.GetExecutingAssembly().EntryPoint.DeclaringType == this.GetType())
{
m_vb6FormDefInstance = this;
}
}
catch
{
}
}
}
//This call is required by the Windows Form Designer.
InitializeComponent();
//This form is an MDI child.
//This code simulates the VB6
// functionality of automatically
// loading and showing an MDI
// child's parent.
this.MdiParent = Project1.MDIForm1.DefInstance;
Project1.MDIForm1.DefInstance.Show();
//The MDI form in the VB6 project had its
//AutoShowChildren property set to True
//To simulate the VB6 behavior, we need to
//automatically Show the form whenever it
//is loaded. If you do not want this behavior
//then delete the following line of code
//UPGRADE_TODO: (2018) Remove the next line of code to stop form from automatically showing.
this.Show();
}