需要学习ASSEMBLY
string strExecutePath = Application.ExecutablePath;
Type tpeForm = null;
Assembly assembly = null;
if (strAssemblyDll != "")
{
strAssemblyDll = Application.StartupPath + "//" + strAssemblyDll;
assembly = Assembly.LoadFrom(strAssemblyDll);
}
if (assembly != null)
{
//tpeForm = assembly.GetType(strNameSpaceExecute);
tpeForm = assembly.GetType(strNameSpaceExecute,true,true);
bolGetSuccess = true;
}
else
{
messagebox.show("没找到窗体");
}
frmExecute = (Form)Activator.CreateInstance(tpeForm);
frmExecute.Visible = false;