sexy-sx
asked on
GetType of a form in another assembly
Hi Experts,
I'm trying to load a form inside a tab page control.
I can do so if the form exists in the current project by using the following code.
Imports System.Reflection
Private Sub LoadTabForm(ByVal FormName As String)
Dim frmTabForm As Form
Dim tpType As Type
tpType = Type.GetType(FormName)
frmTabForm = Activator.CreateInstance(t pType)
frmTabForm.TopLevel = False
FormTabControl.TabPages(Ta bIndex).Co ntrols.Add (frmTabFor m)
frmTabForm.FormBorderStyle = FormBorderStyle.None
frmTabForm.Dock = DockStyle.Fill
frmTabForm.Show()
End Sub
I'd like to call a form from another project in the same solution.
When i try it, it can't find it. Even giving it the full path.
Thanks,
I'm trying to load a form inside a tab page control.
I can do so if the form exists in the current project by using the following code.
Imports System.Reflection
Private Sub LoadTabForm(ByVal FormName As String)
Dim frmTabForm As Form
Dim tpType As Type
tpType = Type.GetType(FormName)
frmTabForm = Activator.CreateInstance(t
frmTabForm.TopLevel = False
FormTabControl.TabPages(Ta
frmTabForm.FormBorderStyle
frmTabForm.Dock = DockStyle.Fill
frmTabForm.Show()
End Sub
I'd like to call a form from another project in the same solution.
When i try it, it can't find it. Even giving it the full path.
Thanks,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
For the form name, you must type in the whole path & form name.
e.g.
Main.UI.Form.MainForm, Main.UI.Form
Thanks,