Click here to Skip to main content
16,004,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hai ,
I have to dock a windows form into ppt application window. I try to do this
by using this code
PowerPoint.Presentation presentation = Globals.ThisAddIn.Application.ActivePresentation;
           MyForm.Parent =(System.Windows.Forms.Control) presentation .Parent;



then the following error message shown

"Unable to cast COM object of type 'System.__ComObject' to class type 'System.Windows.Forms.Control'. Instances of types that represent COM components cannot be cast to types that do not represent COM components; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface."

is there is any way to solve this problem?

Thanks.
Posted

1 solution

A better place for this question is here: http://www.codeproject.com/Forums/1645/Site-Bugs-Suggestions.aspx[^].

—SA
 
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