|
こんな感じですかね? #とりあえず動いたようですが。
Public Class EventRaiser
Private _EventAsyncOp As ComponentModel.AsyncOperation
Public Sub New()
_EventAsyncOp = ComponentModel.AsyncOperationManager.CreateOperation(Me)
End Sub
Public Event Event1()
Protected Sub OnEvent1() RaiseEvent Event1() End Sub
Private Sub OnEvent1Callback(ByVal state As Object) OnEvent1() End Sub
Private Sub AnotherThreadEventReceived() Handles OtherObject.Event1
Dim srcb As New Threading.SendOrPostCallback(AddressOf OnEvent1Callback)
_EventAsyncOp.Post(srcb, Nothing)
End Sub
End Class
|