We help IT Professionals succeed at work.
Get Started

Runtime load of windows forms user control with a DLL FIle

Last Modified: 2012-05-08
I have seen may post about how to load user controls Dynamically from different DLLs based on the Control Name as a string.

My situation is very similar to this.  Except for one issue.  I don't have any DLLs to load my controls from.  

I am trying to dynamically load my user controls that are currently in my .EXE File.
My situation is as follows:
  I load up a tree view with some nodes as my main menu for my application.  These nodes are loaded from a data table.  I place a string in the Tag field of the tree view nodes.  This string is the name of the user control that I want to load into a panel next to my tree view.  

  Is there a way to load the control from within the my code much like the
Assembly.Load(<DLLName>).createInstace(<DLLName>.<ControlName>) without having it in a separate DLL.
Watch Question
High School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Top Expert 2009
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE