I need to be able to handle the .net event in VB6. So far I have created it, making me a visible C # class. My VB6 object can call methods on it perfectly, but now I need a way to communicate with .net on VB. If I add an event to my C # class, then the .net shell seems to add add_EventName and remove_EventName, which I assume is to subscribe and unsubscribe to the event. But I'm still a newbie when it comes to VB6, and I came, so I'm not sure how to use it.
It seems that add_EventName is receiving an EventNameEventHadler event, but what am I giving it? I tried sub, but this gives me a runtime error. Does anyone know how to use this? Here is an example of what I have
Private oHost As HostService.IHost
Private Sub Form_Load()
Set oHost = New HostService.Host
oHost.Start
oHost.add_EvalReceived EvalReceivedEventHandler
End Sub
Private Sub EvalReceivedEventHandler(ByVal sender As Variant, ByVal e As EvalReceivedEventArgs)
MsgBox "Eval Received in VB: " & e.Eval.TimeSent & ":" & e.Eval.FirstName & " " & e.Eval.LastName & " - " & e.Eval.Comments
End Sub
So the oHost.add_EvalReceived line is incorrect