Using a third-party ActiveX as a control in VB .Net 
Author Message
 Using a third-party ActiveX as a control in VB .Net

I want to use a third-party ActiveX as a control (Add it to the
toolbox, and use it as any other control)
I did it in VB6 (on another computer), and now I use Visual Studio
.Net (Trial Edition).

I tried to convert a simple applcation from VB6 to VB .Net, but it
didnot work - I can see the activeX on the form (size, location
properties), but as soon as I try to use its specific Properties, VS
crashes...

(My vendor example is in VC, and this works fine, so I assume that the
ocx works, but the .NET doesnot...)

So, I tried to use CustomizeToolbox|COM ,
and I tried to AXIMP the ocx, and add it ,
and I tried to Add the ocx to References|COM and use it,

 In all cases I end up with -

An unhandled exception of type 'System.NullReferenceException'
occurred in axinterop.wlviewercontrollib.dll
Additional information: Object reference not set to an instance of an
object.
or
System.Windows.Forms.AxHost.InvalidActiveXStateException

Can someone please specify the exact steps I need to do ? What code do
I have to add in my source files ?
Is there a way to use the VC code in the VB project ?

I am new with VB and VB .Net, so please specify exactly each step I
should do.

Thanks

Atara.



Mon, 13 Jun 2005 21:07:16 GMT  
 Using a third-party ActiveX as a control in VB .Net
As someone who has made custom ActiveX controls, I can tell you that
potentially they have coded something that is container specific to VB 6,
perhaps getting data from the dev enviroment. It could be any numbers of
things.

As a demo to myself I just popped one of my controls on a form, it doesn't
work.  That's because it's refferencing and looking for the forms Top, Left
properties.  Well under dot net we now have location coordinates X,Y
instead. So therefor the control is unable to get that information and fails
to function.

To make it work I would need to recode for the possibility of two types of
containers, a VB 6 form and a dot net form. Also I need to amend my caption
property to a text property.

Randy

P.S. check with your vendor and see if they have a dot net enabled update.


Quote:
> I want to use a third-party ActiveX as a control (Add it to the
> toolbox, and use it as any other control)
> I did it in VB6 (on another computer), and now I use Visual Studio
> .Net (Trial Edition).

> I tried to convert a simple applcation from VB6 to VB .Net, but it
> didnot work - I can see the activeX on the form (size, location
> properties), but as soon as I try to use its specific Properties, VS
> crashes...

> (My vendor example is in VC, and this works fine, so I assume that the
> ocx works, but the .NET doesnot...)

> So, I tried to use CustomizeToolbox|COM ,
> and I tried to AXIMP the ocx, and add it ,
> and I tried to Add the ocx to References|COM and use it,

>  In all cases I end up with -

> An unhandled exception of type 'System.NullReferenceException'
> occurred in axinterop.wlviewercontrollib.dll
> Additional information: Object reference not set to an instance of an
> object.
> or
> System.Windows.Forms.AxHost.InvalidActiveXStateException

> Can someone please specify the exact steps I need to do ? What code do
> I have to add in my source files ?
> Is there a way to use the VC code in the VB project ?

> I am new with VB and VB .Net, so please specify exactly each step I
> should do.

> Thanks

> Atara.



Tue, 14 Jun 2005 05:00:43 GMT  
 Using a third-party ActiveX as a control in VB .Net

So, Is there a way to use the VC .Net code in VB .Net project? (I have
.h file with class definition, and .cpp file with calls to
InvokeHelper() function)
???

Atara.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Thu, 16 Jun 2005 15:06:31 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. VB.net + third-party ActiveX components

2. Third-party activex from VB6 to .NET: now property is ReadOnly

3. Third party ActiveX Controls not working properly.

4. ActiveX question (How to use third party controls)

5. ActiveX question (How to use third party controls)

6. Recommend third party activex control

7. Third Party OCX and VB.NET

8. Using third party Active X controls

9. Using third-party Active-x controls

10. VB calling DLL using Third party .ocx

11. VB Third party ODBC control

12. E-mail from VB without third party control - Please help

 

 
Powered by phpBB® Forum Software