G
Guest
Hello:
I have two forms, FormA and FormB. FormA opens FormB. FormB needs to execute
a public method on FormA.
I am able to do it. But I want to generalize the design so that FormB can be
used with any form that required the functionality provided by FormB. Of
course, all these forms will have the public method that will be executed by
FormB.
Currently, I have it coded this way:
Private MyParentForm as FormA
Public Sub New(psForm as FormA)
...
...
MyParentForm = psForm
End Sub
Sub doSomething()
MyParentForm.ExecuteFunction
End Sub
So, in other words, how can I generalize it so the parameter can be any of
the form classes that will have a public method ExecuteFunction?
Thanks.
Venkat
I have two forms, FormA and FormB. FormA opens FormB. FormB needs to execute
a public method on FormA.
I am able to do it. But I want to generalize the design so that FormB can be
used with any form that required the functionality provided by FormB. Of
course, all these forms will have the public method that will be executed by
FormB.
Currently, I have it coded this way:
Private MyParentForm as FormA
Public Sub New(psForm as FormA)
...
...
MyParentForm = psForm
End Sub
Sub doSomething()
MyParentForm.ExecuteFunction
End Sub
So, in other words, how can I generalize it so the parameter can be any of
the form classes that will have a public method ExecuteFunction?
Thanks.
Venkat