|
-
Mar 26th, 2008, 04:19 AM
#1
Thread Starter
Lively Member
Add a subroute to multiple forms
I'm trying to find a way to add a subroutine to multiple forms in VB.net 2k5.
I'm instancing some forms as a property of a class and I need an event that triggers to handle their .dispose property.
I think that's the proper way to describe it. I'm a bit of a noob. Just in case that's not understandable, I'll break it down a bit more below.
I have a public class which contains "Public Myform as Object".
There is are a number of inherited classes which contain "Myform = new (appropriate form)".
When the instance of the form is disposed, I'd like to trigger an additional event.
I can go into each form and add the event, but to keep modification simple, I was hoping there was a way I could create a "handles Myform.dispose" from within the main public class, since it will be the same for all of the various forms that will be loaded.
Initially, I tried using "Public Myform as Form" but because the inherited classes have overloaded events which call properties of their specific form this doesn't seem to work.
Any suggestions?
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
|