|
-
Sep 24th, 2001, 10:59 AM
#1
Raiseevent in class from a form?
Is it possible to raise andevent of a class from a form in the same project?
-
Sep 24th, 2001, 11:06 AM
#2
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.
-
Sep 24th, 2001, 11:35 AM
#3
Thanks. Dont know why I didnt think of that... Duhh.
-
Sep 25th, 2001, 03:46 PM
#4
Lively Member
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.
-
Sep 25th, 2001, 03:49 PM
#5
-= B u g S l a y e r =-
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.
and we'r just getting out of 'goto and gosub hel'l
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|