Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27329

Create a dll event

$
0
0
I have seen a lot of examples on this, but I am just not getting it.

I extracted some of my code below.
This file is compiled into a dll and referenced in the main form.
I cannot figure out how to add an event handler to trigger in the main program when ever the report_data property changes.


Public Class erp_global_data_class

Public Event Report_Data_Changed()


Public Property report_data() As String
Get
Return report_data_var
End Get
Set(ByVal value As String)
report_data_var = value
RaiseEvent Report_Data_Changed()
End Set
End Property
End Class


Main form ------------

Private Sub GotReportData() Handles gv.Report_Data_Changed


End Sub

Error 1 Handles clause requires a WithEvents variable defined in the containing type or one of its base types.

Viewing all articles
Browse latest Browse all 27329

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>