Create an 100% compatible ActiveX Usercontrol with VB.NET

M

Michael

Hi

I know it sounds grazy to create an ActiveX Usercontrol with VB.NET,
where a native tool for this already exists, VB6.
The existing ActiveX Control Containers should be able to load
dynamically the exisitng ActiveX Controls and also the new one written
with VB.NET. We want to make this switch to the new technology, because
the IDE is much more better, the WSDL support is much more better, OO
is included, and so on .....

State at the moment, we have written one usercontrol in vb.net,
eveything works quite fine, but the events don't work.
In the containers we use following code:

dim ocx as vbcontrolextender
set ocx = controls.add(progid, "ctl")

we use the eventhandler from vbcontrolextender
Private Sub ocx_ObjectEvent(Info As EventInfo)
end sub

The sub ocx_ObjectEvent is never been called !

I believe that it is possible to create an 100% compatible usercontrol,
but i don't know exactly how ??

mybe some of yours can help me
thank in advance
michael
 
G

Guest

Hi

This should be possible. I've tried it myself in the past.

Are you just missing the withevents keyword from your variable declaration?

Cheers

Wayne
 
M

Michael

Hi Wayne

Thanks for your response.

I don't miss the "withevents" keyword.
Can you send me your working usercontrol + VB6-Client, or the important
parts of code

kind regards michael
 
M

Michael

Michael said:
Hi Wayne

Thanks for your response.

okay, you are right, i added the withevents keyword, but it doesn't help !
Can you send me your working usercontrol + VB6-Client, or the important
parts of code

kind regards michael
 
M

Michael

Hi

Sorry, i miss the "withevents" keyword in the newsgroups article, in my
real code there is the keyword !!

kind regards
michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top