darkeagle03
New member
- Joined
- Jun 13, 2008
- Messages
- 4
- Programming Experience
- 3-5
OK, Here's the situation. It's kind of long so I'm bolding the parts I feel are most critical.
I have a one-function interface. Whenever an object implements this interface, I know that the implementation of that function is going to open a Form. However, there is no hook back to the Form from the interface.
I need to write a function that can take in any object implementing this interface and then do something when the corresponding Form is closed. I have written 95% of this, including implementing some basic threading to perform the check. What I can't figure out right now is how to get a hook to the Form so that I can determine whether or not it's closed.
I can not modify the interface, and I cannot extend the interface because this needs to be backward compatible with stuff that has already been written. I am open to hacks, including trolling through system memory if need be (I've done that before in VB6). I would like some direction / pointers on how to do this in .NET / what to look for to get me started if anyone has any. If it helps, I also know that the Form will be opened within the same thread as the function, so if anyone knows of a way to determine whether or not a function on a given object is in the process of executing or not, that would work just as well.
I have a one-function interface. Whenever an object implements this interface, I know that the implementation of that function is going to open a Form. However, there is no hook back to the Form from the interface.
I need to write a function that can take in any object implementing this interface and then do something when the corresponding Form is closed. I have written 95% of this, including implementing some basic threading to perform the check. What I can't figure out right now is how to get a hook to the Form so that I can determine whether or not it's closed.
I can not modify the interface, and I cannot extend the interface because this needs to be backward compatible with stuff that has already been written. I am open to hacks, including trolling through system memory if need be (I've done that before in VB6). I would like some direction / pointers on how to do this in .NET / what to look for to get me started if anyone has any. If it helps, I also know that the Form will be opened within the same thread as the function, so if anyone knows of a way to determine whether or not a function on a given object is in the process of executing or not, that would work just as well.