Click here to Skip to main content
15,907,687 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to create a DLL which shall be integrated as extension into another project.
This DLL must have a gui. My preferred solution would be using WPF for creating this GUI, but I don't know how to create a plain DLL with all this XAML stuff.

The second best would be to call a FORM from within the DLL. This works fine until I integrate the pluging. The problem is, that the DLL needs to be deployed to System32 and the other application is situated anywhere else. So the ShowForm() method does not work.

Is there anyone with an idea for a solution?

Regards

Martin
Posted

For some advanced consideration, please check my past answers on the similar questions:
Create WPF Application that uses Reloadable Plugins...[^],
AppDomain refuses to load an assembly[^],
Dynamically Load User Controls[^].

—SA
 
Share this answer
 
Comments
Espen Harlinn 25-Jun-11 11:21am    
My 5, good reading material :)
Sergey Alexandrovich Kryukov 25-Jun-11 17:27pm    
Thank you, Espen.
--SA
Microsoft Produced this Composite Application Guidance[^] to help break up Monolithic WPF/Silverlight apps. I only got started with it when I was move to a Winforms classic project, so I can provide more help, but it sounds like the type of thing you need.
 
Share this answer
 
I've done this in a number of ways.

Pop up the DLL UI as a form, it'll appear to the user to be a form within the main App.
Pop up the DLL UI as a borderless form nested within a user Control in the main App.
Implement user Controls within the DLL and use those as your UI.

I've done this with WinForms with absolutely no problems whatsoever.

Actually, now that I think about it, I have some sample code that might solve your problem,
Here[^]

If you have any specific issues feel free to come back to me.

Good Luck.

-Richard
 
Share this answer
 
For winforms, you can call Application.Run(new myForm()) to show the form on the message loop (which is what you need to run an GUI in winforms).
http://msdn.microsoft.com/en-us/library/ms157902.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900