你name传的是什么啊name应该是窗体的名称不是类名吧

解决方案 »

  1.   

    Form fm=(Form)Assembly.Load(path).CreateInstance(name);
    说明你这句fm的对象是个NULL->说明(Form)Assembly.Load(path).CreateInstance(name)函数执行没成功.
    name是你想要反射到的窗体类的类名,检查下是否写对了?
      

  2.   

    Form fm=(Form)Assembly.Load(path).CreateInstance(name);
    说明这个为空
    看个是不是没写对@
      

  3.   

     Type type = Type.GetType("WindowsApplication1.Form1, WindowsApplication1");
     if (type != null)
     {
    Form from = type.Assembly.CreateInstance(type.FullName) as Form;
     }