Event handling in another class

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • revelpulle
    New Member
    • Dec 2011
    • 1

    Event handling in another class

    I have an event defined and firing in class B
    Public myEvent()

    In class A:

    Private WithEvents _b as B
    .
    .
    .

    Private Sub hander() Handles _b.myEvent



    But, this handler does not get called. What could be the reason for this? If I handle this event in Class B, then it's fine. Any help is appreciated. thanks
  • Crusader2010
    New Member
    • Nov 2011
    • 13

    #2
    Are you raising the event properly in class B? Did you try

    Private WithEvents _b as B = New B() ??

    Check http://devcity.net/PrintArticle.aspx?ArticleID=102

    Comment

    Working...