tags:

views:

37

answers:

0

Hello Everyone

I referred to an Active X component in my VB project. It has some forms. when ever any operation happens on the form, it(DLL) raises an event. How to handle that event in VB ?

I have declared like this:

Public withevents FormEventCapture as vFormAgent.__vFormAgentLib_Event

vFormAgent is the reference to DLL.

Then the function(event handler) definition is like this:

Public Sub FormEventHandler(Byval FormName as String, Byval ControlType as Integer, ByVal ControlId as Integer, ByVal ControlData as String) Handles FormEventCapture.FormEvent

                     MessageBox.Show("I am here")
End Sub

FormEvent is the event that is raised when ever, some event occurred on the form by the DLL.

But, i am not able to handle this event in VB.Net in this way. Can any one help me out?

Thanks a lot.