Is it possible to raise andevent of a class from a form in the same project?
Printable View
Is it possible to raise andevent of a class from a form in the same project?
You could make a sub that triggers the event as part of the object. Like obj.Notify and then inside the class rasieevent NotifyEvent. Or if you pass the form to the object the object could use the form events. So if you wanted to check a condition in the Form_Load event and possibly raise an event in the object from that you could. Just make a private withevents Form variable in the object and then have a prop that Sets the passed form to that form.
Thanks. Dont know why I didnt think of that... Duhh.
Dear Cander ,
I have the same problem , which I stuck with it for a week , so if you maneged to sulve this I would be thankfull if you could help me and show me how ypu did it.
Thanks Moyalt.
and we'r just getting out of 'goto and gosub hel'l :DQuote:
Originally posted by Edneeis
You could make a sub that triggers the event as part of the object. Like obj.Notify and then inside the class rasieevent NotifyEvent. Or if you pass the form to the object the object could use the form events. So if you wanted to check a condition in the Form_Load event and possibly raise an event in the object from that you could. Just make a private withevents Form variable in the object and then have a prop that Sets the passed form to that form.