Hi all:
I have a general question concerning scoping of code within an application.
I have written an application that consists of a main (parent) form with a toolbar that shows several additional (child) forms based on the value selected on the toolbar.
I have noticed that each of the child forms share identical or nearly identical event handlers like the form load handler, the form close handler, and various common button click event handlers (for exporting to excel, or printing, or initiating a database query etc).
Is there a way to place/define this common code so that it is not replicated amongst each of the forms?
It would be great if these common elements could be defined once in the overall project and not have to be in each form.
Thanks in advance for any suggestions.
I have a general question concerning scoping of code within an application.
I have written an application that consists of a main (parent) form with a toolbar that shows several additional (child) forms based on the value selected on the toolbar.
I have noticed that each of the child forms share identical or nearly identical event handlers like the form load handler, the form close handler, and various common button click event handlers (for exporting to excel, or printing, or initiating a database query etc).
Is there a way to place/define this common code so that it is not replicated amongst each of the forms?
It would be great if these common elements could be defined once in the overall project and not have to be in each form.
Thanks in advance for any suggestions.