Home > Archive > Visual Basic Controls > July 2006 > TypeOf returns False on VC# created activex control
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
TypeOf returns False on VC# created activex control
|
|
| Balaji 2006-07-01, 10:01 pm |
| I have a user control created in VB6.0. I am using this ocx in VC# or VB.NET
through interop. When this control is sent back to a VB6.0 function as object
and checked there with if TypeOf usrctl is Control, this returns false.
We need this to work as we heavily use interop in our production applications
| |
| Michael C 2006-07-02, 4:01 am |
| "Balaji" <Balaji@discussions.microsoft.com> wrote in message
news:C6B826D5-A39D-4820-BA06-DA95EAB9A4B3@microsoft.com...
>I have a user control created in VB6.0. I am using this ocx in VC# or
>VB.NET
> through interop. When this control is sent back to a VB6.0 function as
> object
> and checked there with if TypeOf usrctl is Control, this returns false.
>
> We need this to work as we heavily use interop in our production
> applications
VB6 creates an additional wrapper around the usercontrol to add properties
to it such as left, top etc. You might need to check typeof MyControl.Object
I think.
For dot net interop imports a class and an interface, you might need to
check against 1 or the other, I'm not sure which.
| |
| Bob Butler 2006-07-02, 8:01 am |
| "Balaji" <Balaji@discussions.microsoft.com> wrote in message
news:C6B826D5-A39D-4820-BA06-DA95EAB9A4B3@microsoft.com
> I have a user control created in VB6.0. I am using this ocx in VC# or
> VB.NET through interop. When this control is sent back to a VB6.0
> function as object and checked there with if TypeOf usrctl is
> Control, this returns false.
>
> We need this to work as we heavily use interop in our production
> applications
You should probably ask in a newsgroup with "dotnet" in the name as it
sounds like a problem with interop more than VB
--
Reply to the group so all can participate
VB.Net: "Fool me once..."
|
|
|
|
|