Solved

GetType of a form in another assembly

Posted on 2004-09-30
3
277 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now