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

  • Thread starter Thread starter Rethish R
  • Start date Start date
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
 
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
 
Back
Top