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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you make a Active X component in c#

Status
Not open for further replies.

tomcoombs

Programmer
Aug 14, 2003
65
GB
Is it poss, it was a project type in VS 6 C++.


Thanks all

Tom
 
Yes - you go into the project properties and tell it to produce a COM callable wrapper.

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
Thanks Chip,


To sound dumb. I have found "Wrapper Assembely Key File" and "Wrapper Assembely Key Name."


But where is this option exactly?


Thanks Again

Tom
 
In the project properties dialog, go to Configuration Properties, and under the Outputs branch, turn on Register For COM Interop.

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
Done that, complies.

Then I try to load it into the ActiveX Test container. (Comes with VC 6.0) And its not listed in the registered COM controls.

Will get there....



Thanks

Tom
 
I see that this has made a type libary file, which gives me hope.

I can then #import into c++ for example, but what deals with the graphics of the activeX control?

(Mind spinning :) Hope you can help

Tom
 
I think what's throwing us off is the thread is titled 'Can you make a Active X component in c#' when you're really asking 'Can you make a Active X control in c#'.

I think the answer is a definite maybe, leaning more towards the "maybe".

Maybe someone else knows more than I do, but I would think that you would continue to use your existing ActiveX controls in your ASP pages, and write new Web controls using .NET as needed.

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
All sounds good, but I need a reuseable thing to use in C++, and .net made in .net..



Surly .net must offer a solution, does not HAVE to be Active X.


Thanks as ever, all previous help is great


Regards


Tom
 
Thanks again Chiph, does anybody else have a good knownledge of ActiveX manufacture in .net?


Thanks in Advance

Tom
 
Look up COM callable wrappers in the documentation. This makes a wrapper around a .NET class that COM can use. Conversely, look for runtime callable wrappers to use a COM component from .NET.

Durkin
 
Thanks again, this I feel that this is getting closer...

Are you definatly talking about running the .net usercontrol dll in the activeX container?


Any other ideas? Have you actually ever managed to create a .net usercontrol dll and somehow run it in the activeX container?



Regards

Tom
 
Hmmm....
I've never actually used .net from com, only the other way around. I just remembered this stuff from when I was initially reading up on .net. I have the feeling though that to have an activex control you need to inherit from some base 'Control' class which would be a com class. So then you would need to have a wrapper around the base class to use it in .net. Then a wrapper around the .net class to use it in com. I'm not sure the inheritability(is that a word?) would last through these changes.
Is it possible for you to make the control in VS6 and then just put a runtime callable wrapper around it when you need to use it in .net? This would probably be the easiest solution.

Durkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top