views:

36

answers:

2

I maintain a legacy application (unmanaged C++) and I need a new control (Basic Form). I would like to build this control in C# for simplicity but use it from my legacy app. Any suggestions?

A: 

Theoretically you could build the c++ into a dll and use it, but there is really not enough information here.

kkaploon
+1  A: 

Well, you might want to make a COM control in C#, register it and use it from within your C++ application. I can't see any other way of using a .NET control in C++ - however, I haven't tried that.

Thorsten Dittmar
This was my first thoughts as well, and I was able to get it work. Basically by createing an interface with the method: public IntPtr GetHandle() { return this.Handle; }I was able to get a handle to my component and add do any modifications required in C++.