string DllPath = @"D:\Projects\CSharp\Applications\someDll.dll";
System.Reflection.Assembly assmble = System.Reflection.Assembly.LoadFile(DllPath);Form subForm = (Form)assmble.CreateInstance(typeName);加载Dll中的一个窗体.subForm.MdiParent = formMdiParent;

解决方案 »

  1.   

    完整一点的代码:private void button1_Click(object sender, System.EventArgs e)
    {
    string DllPath = Application.StartupPath + @"\someDLL.dll";
    System.Reflection.Assembly assmble = System.Reflection.Assembly.LoadFile(DllPath);
    string typeName = "someDLL.frmDll";//namespace + formClassName
    object tmpObj = assmble.CreateInstance(typeName);
        
    if (tmpObj is Form)
    {
    Form subForm = (Form)tmpObj;
    subForm.MdiParent = this;
    subForm.Show();
    }
    }