tryType t = Type.GetType("test.Form1");
//构造参数
object[] args = new object[2]{yourparam1,yourparam2};object obj = System.Activator.CreateInstance(t,args);Form showForm  = (Form)obj;
showForm.Show();

解决方案 »

  1.   

    Activator.CreateInstance有提供你传递参数的方法的
    参数是一个object[]数组
    如上面写的那样
      

  2.   

    Assembly.LoadFrom("test.dll");
    当然还有LoadFile等,看你怎么用了:)
    不过好像用这个dll里的类来CreateInstance是必须要先装载这个dll的
      

  3.   

    现在将这个程序编译输出类型为类库,编译为test.dll,在另外一个ss_manage项目中引用
    ---这个意思大概是说,已经添加了引用吧
    如果没有添加这个DLL的引用,可以
    Assembly a = Assembly.LoadFile("test.dll");
    Type t = a.GetType("test.Form1");
    //构造参数
    object[] args = new object[2]{yourparam1,yourparam2};object obj = System.Activator.CreateInstance(t,args);Form showForm  = (Form)obj;
    showForm.Show();
      

  4.   

    强类型,在assemblyName中指定
    Version, Culture, PublicKeyToken
      

  5.   

    秋枫兄,强类型怎么用法?小弟道行还潜不会,还得修炼啊。不过按着 brightheroes 兄 的办法已经完全解决了。谢谢!也同样谢谢大家。大家以后可以参考。结贴!
      

  6.   

    mars131(自由自在131)兄,不好意思,没留神忘给你分了。包涵包涵!
      

  7.   

    我再说的仔细一点:
    Private Ini1 As Ini1
    -----------------------------------------------------
    If Ini1 Is Nothing OrElse Ini1.IsDisposed Then
                Ini1 = New ini1
                Ini1.MdiParent = Me
                Ini1.Show()
                Me.Refresh()
            Else
                Ini1.Activate()
    End If
    ------------------------------------------------------
    我要对-------内的内容进行打包,打包就必须要传值,但传的值为Ini1(为Form)和New ini1(这个为Class)
    这个包该怎么打呢?