Click here to Skip to main content
15,892,965 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I am facing a little problem where I have a third party DLL which has exposed a dialog box Window. I want my form to have this dialog as one of its tab and not as a popup.
The problem is that the Dialog is inherited from
public class CThirdPartyDialog : Window, IComponentConnector
and my Own application is a simple Form application inherited from
public class PersistingForm : System.Windows.Forms.Form
. And Some how I am not able to figure out the way I can have the dialog box added as a control in my form class object.

Thanks for you help.


-Kushagra


I believe in Me !!! :)
Posted
Comments
BillWoodruff 23-Sep-11 8:48am    
Can you access the source code of the 3rd. party Dialog ? Is the class sealed, or can you sub-class it ?
Kushagra Tiwari 23-Sep-11 8:53am    
Depends.. If needed I can but if possible I want to access it as it is. But, if you know the solution of how to go about editing the source code then kindly give me some pointers on it ... I think its sealed ..
BillWoodruff 23-Sep-11 9:21am    
If the class is 'sealed' then you can't sub-class it. The problem here, I think, is that the dialog must, after all, serve some purpose in the 3rd. party control, and you will need to duplicate not only the UI to make it a UserControl or whatever, but also its functionality in the 3rd. party control. Unless the dialog's purpose is very simple, and its functionality easy to simulate, then you need access to the source of the complete 3rd. party control ?
Sergey Alexandrovich Kryukov 25-Sep-11 0:01am    
You are right. Also, you could note that the 3-rd party dialog is written for WPF while the host application is in System.Windows.Forms. This is more difficult problem. Such interoperation is possible, but with modal dialog...
--SA
BillWoodruff 25-Sep-11 1:33am    
Excellent point SA !

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