Solved

GetType of a form in another assembly

Posted on 2004-09-30
3
279 Views
Last Modified: 2012-06-21
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(tpType)
       
        frmTabForm.TopLevel = False
        FormTabControl.TabPages(TabIndex).Controls.Add(frmTabForm)
        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,

0
Comment
Question by:sexy-sx
3 Comments
 

Author Comment

by:sexy-sx
ID: 12196412
That's ok, i found it.

For the form name, you must type in the whole path & form name.
e.g.

Main.UI.Form.MainForm, Main.UI.Form

Thanks,
0
 

Accepted Solution

by:
ee_ai_construct earned 0 total points
ID: 12227097
Question answered by asker or dialog valuable.
Closed, 75 points refunded.
ee_ai_construct (replacement part #xm34)
Community Support Admin
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question