Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OLE Automation

Status
Not open for further replies.

vtops

IS-IT--Management
Oct 13, 2005
63
GR
Dear all,

Have anyone sample code on how can i handle OLE objects in C#?
I have imported the stdole.dll from Visual Studio 6.0 in the references of my project but i can't understand how can i use it.


Thanks a lot everybody
 
You shouldn't have to do that.

Just add a COM reference to the library that you want to use, and all you should need to do is call it's methods like normal. The .NET COM Interop layer will take care of everything, in 99% of the cases.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Dear chiph,

I have imported from to the .net com interop the OLE Automation Component but i don't know how will i use it under C#. in VB 6.0 there is an object when you drop it on the form automatically opens an interface on how you will you handle your OLE object. How can i diplay that interface on C#.

Thanks a lot?
 
I think that i found something, i must import the file VB6.OLB into the references of my project and with that way, i will have access on VB.OLE class. in c#.net the importation is not possible while i am trying to do it ,i have the following error message:

A reference c:\program files\visual studio 98\vb98\vb6.olb could not be added to a .net assembly failed. could not load type VB.PictureBoxClass from assembly interop.VB Version=6.0.0

Any Ideas On how will i import it?

Thank You
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top