Click to See Complete Forum and Search --> : How to raise a event in a user-defined class module and handle this event by the same class module?


Paul Chan
April 8th, 1999, 03:45 AM
Hi! Everybody!
I meet a question. How i can raise a event in a user-defined class module and i want use one function to handle this event in the same class module? It means i want to event source and the event sink in the same class! How can i achieve it?
Thank you anybody's help!
Thank you very much!

Lothar Haensler
April 8th, 1999, 04:03 AM
excerpt from the Visual Basic documentation (heading: "Adding Events to Classes"):
"Events cannot be handled within the class that declared them."

Chris Eastwood
April 8th, 1999, 04:18 AM
Hi

VB doesn't allow you to raise errors and catch them in the same class.

- Couldn't you just call a private method in your class when you need to ?


Regards

Chris Eastwood

CodeGuru - the website for developers
http://www.codeguru.com/vb