Method 1 (REFLECTION):
Dim str As Stringstr = "myTest.Form2" 'must be namespace p form class name Dim tempAssembly As System.Reflection.Assembly = System.Reflection.Assembly.GetExecutingAssembly () Dim frm2 As Form = CType (tempAssembly.CreateInstance (STR), FORM) fr2.show ()
Method 2 (Type.gettype ()):
Dim frmName, fullName As String frmName = "form2" fullName = Application.ProductName & "." & FrmName Dim frm2 As Form frm2 = Activator.CreateInstance (Type.GetType (fullName, True, True)) frm2 .Visible = True