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();
//构造参数
object[] args = new object[2]{yourparam1,yourparam2};object obj = System.Activator.CreateInstance(t,args);Form showForm = (Form)obj;
showForm.Show();
解决方案 »
- 大家帮忙看看为啥我这老的到按钮文本而不是alert文本?
- 算法求教!
- WF 在运行时增加流程步骤的问题
- WP7程序运行无法显示
- 谁知道 怎么在UserControl的派生类上应用泛型?
- VSTO(Visual Studio Tools for Office)参考书,大家认为怎么样?
- System.Data.OleDb.OleDbException: 未指定的错误
- 求助c#组件设计(新人)
- winform中的DataGrid怎么用程序加一个带有 <a href=# onclick="reply(i);">回复</a> 的模版列?????
- 求一个销售管理系统
- 没有分了,不知道有没有人帮忙???
- DataTable 的 select方法
参数是一个object[]数组
如上面写的那样
当然还有LoadFile等,看你怎么用了:)
不过好像用这个dll里的类来CreateInstance是必须要先装载这个dll的
---这个意思大概是说,已经添加了引用吧
如果没有添加这个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();
Version, Culture, PublicKeyToken
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)
这个包该怎么打呢?