Diff. between VB6 Control Type and .Net Control Type

Hi,

In my VB6 application i am having a function which returns of type Control as follows,

Private Function MyFunction(param1 As String, param2 As MyType) As Control

Now Inside this funtion I am calling .Net fuction, this .Net function returns of type Control (.Net), when i am trying to assign the .Net Control to the VB6 control it says type mismatch.

MyFunction = ineropObj.GetNetObj();

Is that correct? any solution?

Regards,

Benin.

[489 byte] By [Benin] at [2008-2-15]
# 1

The VB6 type "Control" and the .NET type "Control" are not the same type. You cannot assign one to the other.

What are you actually trying to accomplish? You'll need to consider another way to achieve it.

DeborahK at 2007-10-8 > top of Msdn Tech,Visual Basic,Visual Basic Interop and Upgrade...