raise events from a nested class

P

Pietro

Hello, somebody know how to raise an event from a nested class?

I have two classes, the class1 with 1 events, and a
nested class (class2) inside the class1. So... How can I raise class1 events
from the class2?

Public Class class1
Public Shared Event Evento1(ByRef sender As Object)

Public Class class2
Public Sub Pippo()
RaiseEvents MioEvento 'error !!!!!!
End Sub
End Class
End Class


Thanks a lot!!
 
G

Guest

Add an event and raise it in Class 2 then in the Class 1 handler for the
Class 2 event, raise the Class 1 Event. Of course, in Class 1, you must
declare Class2 WithEvents.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top