How to use C# Control in VC6 ???

  • Thread starter Thread starter Phanendra
  • Start date Start date
P

Phanendra

Hi All,
I have developed a C# control( added custom registry
functions to add registry entries as ActiveX control, and
set the option 'Register for COM Interop' to true in
VS.NET), once I build this control I am able to see this
control in VC6 dialog application(in Insert ActiveX
Control dialog), but when I insert instatiation always
fails.
I could insert and see my control very well in the
testcon32.exe tool comes with the VS.NET.
As I understand this is not supported by MicroSoft... but
still is there any way to do this???
Pl help me out..
Thanx in advance,
Phanendra
 
Hi Nicholas,
Thnx for the reply.
I tried the sample from the link given by you, but it
also fails to insert control into MFC Dialog,
error:"The ActiveX control cannot be instantiated." and
after it "The ActiveX control failed to initialze
properly."
Any idea why this fails??
Thnx,
Phanendra

-----Original Message-----
Phanendra,

Exporting ActiveX controls from .NET is not supported, so I am not
surprized that this doesn't work. The only person I have seen that has done
work in this area is Chris Sells, and he has an EXTREMELY unsupported hack.
You can find it at (watch for line wrap):

http://www.ondotnet.com/pub/a/dotnet/2003/01/20/winformsh osting.html

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Phanendra said:
Hi All,
I have developed a C# control( added custom registry
functions to add registry entries as ActiveX control, and
set the option 'Register for COM Interop' to true in
VS.NET), once I build this control I am able to see this
control in VC6 dialog application(in Insert ActiveX
Control dialog), but when I insert instatiation always
fails.
I could insert and see my control very well in the
testcon32.exe tool comes with the VS.NET.
As I understand this is not supported by MicroSoft... but
still is there any way to do this???
Pl help me out..
Thanx in advance,
Phanendra


.
 
Phanendra,

I do not know why it fails. Like I said, this kind of activity is
unsupported in .NET. You might have to resort to another technology to do
what you are trying to accomplish.

However, if you separated most of your business code out into separate
projects, you should be able to use that through COM interop when you build
the control with another technology (as long as that technology supports
COM).

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Phanendra said:
Hi Nicholas,
Thnx for the reply.
I tried the sample from the link given by you, but it
also fails to insert control into MFC Dialog,
error:"The ActiveX control cannot be instantiated." and
after it "The ActiveX control failed to initialze
properly."
Any idea why this fails??
Thnx,
Phanendra

-----Original Message-----
Phanendra,

Exporting ActiveX controls from .NET is not supported, so I am not
surprized that this doesn't work. The only person I have seen that has done
work in this area is Chris Sells, and he has an EXTREMELY unsupported hack.
You can find it at (watch for line wrap):

http://www.ondotnet.com/pub/a/dotnet/2003/01/20/winformsh osting.html

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Phanendra said:
Hi All,
I have developed a C# control( added custom registry
functions to add registry entries as ActiveX control, and
set the option 'Register for COM Interop' to true in
VS.NET), once I build this control I am able to see this
control in VC6 dialog application(in Insert ActiveX
Control dialog), but when I insert instatiation always
fails.
I could insert and see my control very well in the
testcon32.exe tool comes with the VS.NET.
As I understand this is not supported by MicroSoft... but
still is there any way to do this???
Pl help me out..
Thanx in advance,
Phanendra


.
 
Back
Top