Solved

GetType of a form in another assembly

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

911 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

22 Experts available now in Live!

Get 1:1 Help Now