private ManagedForm GetForm(int ID) { string ModuleName = (string)Modules.Tables["Module"].Rows.Find(ID)["Assembly"]; // Type.GetType(ModuleName) if (File.Exists(string.Format("{0}\\{1}.dll", Application.StartupPath, ModuleName))) { Assembly MyAssembly = Assembly.LoadFile(string.Format("{0}\\{1}.dll", Application.StartupPath, ModuleName)); return (ManagedForm)MyAssembly.CreateInstance("CarAdmin." + ModuleName, true); } return null; } public void OpenForm(int ID) { ManagedForm ToLoad = GetForm(ID); if (ToLoad == null) { // TODO: handle das wenns nicht geht } else { // This.Parent ist das MDI ToLoad.Parent = this.Parent; ToLoad.Show(); } }