This is how i managed to open a second form, not sure if its the correct way though since i havent dealt much with reflection.
Code:
Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
Form f = null;
foreach (Assembly a in assemblies)
{
Type[] types = a.GetTypes();
foreach (Type t in types)
{
if (t.IsPublic && t.BaseType == typeof(Form))
{
if (t.FullName.Contains("Form1"))
{
f = (Form)a.CreateInstance(t.FullName);
}
}
}
}
if (f != null)
f.Show();
You might want to explore the Tag property so you can assign a certain Assembly to a certain node and so on. This should make the code something along the lines of
Code:
Form f = (SelectedNode.Tag as Assembly).CreateInstance(SelectedNode.Text) as Form;