Is there a good way to create a form in VB6 that can be easily integrated into other forms?
Several times recently, I wanted to create and encode a Form object that I could connect to several other "parent" forms. My goal is to create a centralized piece of code to control several components of the user interface in a certain way, and then be able to use this (both the location of the user interface and the logic) in several places. Of course, I want to use the code (not the design) to load the child form.
The best thing that I have come up with so far is to output all the interesting logic for the child form to the class module, and each of the parent forms will lay out the user interface (possibly in Picture mode) and pass this Image Object to the class module. The class then knows how to work in the picture, and assumes that all of its expected parts have been laid out accordingly. This approach has several drawbacks, and I would like a little more elegantly.
source
share