http://www.dotnet247.com/247reference/msgs/4/20375.aspx
Long discussions comes to the conclusion that this was SUPPOSED to be
supported, but was cut out. Maybe we'll get it at some point in the
future????
I'm not the only developer who NEEDS to do this ... directly or through some
workaround. I realize MS thought developers would more often need to put
old controls into new projects, but it really DOES go both ways.
For a week now, I've been instantiating a .NET control at runtime from VB6,
but the lousy thing won't show up on the screen. Its Visible property is
true ... but it can't be seen.
Since image display is what I'm working on here, I tried a BitBlt from the
..NET control's Handle to my VB6 PictureBox's hDC. No error, but no luck.
I AM managing to reach over to the .NET control's Image (that I'm exposing)
with a GetPixel call, then paint pixel-by-pixel in VB6. Stinks, but may
work in my case.
dwilson
"Daniel Wilson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> OK, here are some links for anyone who wants to explore what I'm
exploring:
> http://www.ondotnet.com/pub/a/dotnet...mshosting.html -- an
> unsupported method that sometimes works.
> http://www.dotnet247.com/247referenc...55/276599.aspx -- Maybe works,
> but munges the name.
>
>
> "Daniel Wilson" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I am replacing an ActiveX OCX that was created in VB6. It is used
heavily
> in
> > a large VB6 program that I do not have the luxury of upgrading to .NET.
> >
> > The new control must use a significant amount of code that was written
in
> > C++ .NET for a web service.
> >
> > In C++ .NET, I have the option of creating an MFC ActiveX Control. That
> > control loads onto a VB6 form just fine. But when I start including
..NET
> > managed code, I run into compile errors.
> >
> > I also have the option of creating a Windows Control Library (.NET). But
> > this doesn't load into the VB6 form, at least in the designer. This link
> > suggests this approach might work at runtime:
> > http://p2p.wrox.com/topic.asp?TOPIC_ID=5542
> >
> > This one sounds like what I want to do is completely impossible.
> > http://www.dotnet247.com/247referenc...24/122843.aspx
> >
> > Can my .NET code be used on by VB6 form? Can you point me to some
> > information on doing so? On writing a wrapper to do so?
> >
> > Thanks!
> >
> > dwilson
> >
> >
>
>