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

Could anyone please let me know how to invoke methods of an ocx in a C# console application?

Thanks in advance.

Pari M
Posted
Updated 1-Nov-10 2:49am
v2

The last answer in this[^] thread seems to have a solution although perhaps if you edit your question to explain exactly what it is you are trying to do, and why, someone might suggest a better method.
 
Share this answer
 
Comments
Nish Nishant 1-Nov-10 8:49am    
Voted 5, proposed as answer.
Pari Margu 2-Nov-10 6:13am    
Ok Henry Thanks for ur time... I got the solution
:)
 
Share this answer
 
Comments
Pari Margu 2-Nov-10 6:08am    
Hi Rajesh... Thanks for ur help :)
To add to Henry's answer, the interop dll should get auto-generated if you add a COM reference via the Visual Studio Add Reference dialog. Then you can use the COM types normally.
 
Share this answer
 
Comments
Pari Margu 2-Nov-10 6:14am    
Thank you Nishant :)

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