vb6 handles .net com class events
i have the ComClassSearchCustomers class and interface IComClassSearchCustomersat .net which used to create a tlb file. The class raise an event inside new. After that i have a vb6 form Form1 which catch the event , but it never see the event. Any ideas?
Option Strict On
Option Explicit On
Imports System.Runtime.InteropServices
_
Public Class ComClassSearchCustomers
Public Delegate Sub printReportEventHandler(ByVal codes As String)
Public Event printReport As printReportEventHandler
Public Sub New()
MyBase.New()
RaiseEvent printReport("MARIA")
End Sub
End Class
Imports System.Runtime.InteropServices
_
Public Interface IComClassSearchCustomers
_
Sub printReport(ByVal codes As String)
End Interface
Public WithEvents Instance As Search.ComClassSearchCustomers
Private Sub Form_Load()
Set Instance = New Search.ComClassSearchCustomers
End Sub
Private Sub Instance_printReport(ByVal codes As String)
MsgBox ("raise")
End Sub