Raise the events in VB 6.0 where the events are defined in VB.Net

R

Rethish R

Hi,

I have defined few Events in VB.Net, Register the DLL using "Register
Interop for COM" Option. Now I have referred the class in VB 6.0. That
is add the referrence for the DLL. But I am not able to declare the
Events and invoke the events in VB 6.0

Please have a look at the VB code

Private WithEvents eHandle as <NameSpace>.<ClassName>

I get an error while using the above statement declaration.

Can you please tell me where I am wrong?.

Is there any other method available to raise the events in VB 6.0
where the events are defined in VB.Net?

Any Help or Suggestion


Thanks,
Rethish
 
K

Ken Tucker [MVP]

Hi,

Couple of things. Make sure the class is comvisible, register the
dll with regasm, and make sure any events in the class are declared as
public.

http://msdn.microsoft.com/library/d...eropservicescomvisibleattributeclasstopic.asp

http://msdn.microsoft.com/library/d...ml/cpgrfassemblyregistrationtoolregasmexe.asp

Ken
----------------------
Hi,

I have defined few Events in VB.Net, Register the DLL using "Register
Interop for COM" Option. Now I have referred the class in VB 6.0. That
is add the referrence for the DLL. But I am not able to declare the
Events and invoke the events in VB 6.0

Please have a look at the VB code

Private WithEvents eHandle as <NameSpace>.<ClassName>

I get an error while using the above statement declaration.

Can you please tell me where I am wrong?.

Is there any other method available to raise the events in VB 6.0
where the events are defined in VB.Net?

Any Help or Suggestion


Thanks,
Rethish
 

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