Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42220

Public Shadows Event

$
0
0
I am able to override subs in a class but I cannot get an event to fire?

(user controls)

Public Class myTest

Public Shadows Event TestEvent()

Public Overridable Sub TestSub()

end Class



other class...

Public Class myTest2
inherits mytest

Public Shadows Event TestEvent()

public Overrides Sub TestSub
raiseevent TestEvent
end sub

end class


I can get the TestSub Sub to execute but not the TestEvent

Dim X as mytest
x=mytest2

' works
x.TestSub



from main form

' this doesn't work
addhandler x.TestEvent, TestEventEvent


' this will work
addhandler x.click, TestEventEvent

Viewing all articles
Browse latest Browse all 42220

Trending Articles