Hi all,
When I want to show user a (windows) form which resides in a DLL (in this case Form1), I use the following code from another executable;
Assembly a = Assembly.Load(System.IO.File.ReadAllBytes("mydll.dll"));
Form MyDLLFormInstance = (Form)a.CreateInstance("myNamespace.Form1");
MyDLLFormInstance.Show();
Now, I created another DLL using WPF. When I use the above code, I got the following error;
Unable to cast object of type 'myNamespace.Window1' to type 'System.Windows.Forms.Form'.
So, How can I cast System.Windows.Window to System.Windows.Forms.Form? Or, how can I show the window which resides in a WPF-created-DLL from c# forms app?