Solved

GetType of a form in another assembly

Posted on 2004-09-30
3
284 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

623 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