反射动态调用WinForm窗口

代码如下:
Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
Type type 
= assembly.GetType("CoalTraffic.Report." + strReportArea + "LoadWeightPrint");
object obj = Activator.CreateInstance(type, strWeightCode,true); Form formToShow = (Form)obj; formToShow.ShowDialog();
posted on 2009-12-28 14:40  一路前行  阅读(528)  评论(0编辑  收藏  举报