Groups | Blog | Home
all groups > dotnet interop > march 2005 >

dotnet interop : Future support of ActiveX wrapper of .NET user controls?



Mike Jansen
3/23/2005 5:02:53 PM
This seemed to be a popular topic a while back and I haven't seen any recent
posts on it, so I'm going to ask:

It is currently unsupported to create a UserControl in .NET and do the
interop wrappers to make it function _properly_ when used as an ActiveX
control. Is there support for this planned in VS.NET 2005? Or is there
more recent news from Microsoft indicating how to support it with the
current VS.NET 2003?

I've got it _almost_ working with VS.NET 2003 but I can't get events to be
captured/fired properly. Also, I'm concerned about reports of other people
doing this and having mysterious exceptions and other various problems using
the controls.

So if anyone can answer my main question (will it be supported in future) or
fill me in on a solid way to do it now, I'd really appreciate it.

Thanks,
Mike Jansen
Prime ProData, Inc.

Mike Jansen
3/24/2005 8:46:57 AM
A note to any Microsoft team member that may be reading:

For migration purposes, having the ability to write user controls in .NET
and then host them in VB/FoxPro, etc. would greatly help migration and would
encourage .NET development (which I assume is a big goal of MS). Not being
able to do this forces us to only do non-visual stuff in .NET do all the UI
in legacy products.

Real-life example: Our current product is written in FoxPro. A co-worker
and I are working on an almost exclusively .NET project. The problem is we
need to integrate into the existing FoxPro applications. In doing so, we
were hoping to use the user controls we had written and plunk them on FoxPro
forms. Of course we expected a little bit of interop work. Now that I've
done my research and some experimenting on my own, I'm near the conclusion
that we aren't going to do this. We are going to have to re-write the
visual components in FoxPro and only call the non-visual functionality that
was written in .NET. This may seem like a little thing, but in all honesty
I think it may be a significant factor in how much .NET is used in our
applications. It will keep .NET in the realm of non-visual components and
make it difficult for it to enter into the realm where we have established
visual applications done in FoxPro.

My purpose in this is post directed to Microsoft is fueled by this post
http://discuss.develop.com/archives/wa.exe?A2=ind0107b&L=dotnet&F=&S=&P=16992,
specifically the quote "We talked to a number of customers before coming to
this decision [of not supporting Windows Forms controls in VB, et. al.] and
our conclusion was that it would not be a heavily used feature." I believe
it is an important feature for businesses to have in order to migrate to
..NET.

Mike Jansen



[quoted text, click to view]

EggHead
3/24/2005 4:53:20 PM
I do not understand what is your problem here.
If you do MVC, it should not cause any problem at all.
I think it is no work around for VB application to host a .Net user control.
In fact, I think it is a wishful thinking. In addition, you will run in a
lot of problems even add an ActiveX ctl in a .Net Windows Form.

Egghead

[quoted text, click to view]

AddThis Social Bookmark Button