为什么事件处理程序在我尝试以与按预期引发和处理私有事件相同的方式引发私有事件时创建的对象时不响应事件
Public Class Form1
Dim WithEvents nClass As Class1
Private Sub nClass_Created(ByVal sender As Object, ByVal e As System.EventArgs) Handles nClass.Created
MessageBox.Show("Created !")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
nClass = New Class1
End Sub
End Class
Public Class Class1
Event Created(ByVal sender As Object, ByVal e As EventArgs)
Sub New()
'some codes
'when finish
RaiseEvent Created(Me, New EventArgs)
End Sub
End Class