I have inherited a load of VB6 code which has tons of individual OCX files, each of which contain a single control. I have two questions:
Firstly, Is it possible to refactor them so that I can have a single OCX file with all the OCX’s in it?
Secondly, if it is possible, how do I do this?
TIA
Yes this is possible.
You can do this by selecting Project->Add User Control from within an existing ActiveX User Control project. From here you can choose to add a new control to the project or add an existing user control.
Also, it can certainly make sense to group related controls together into a single project, as long as you group controls according to some kind of logic. For example, the Forms 2.0 library groups ‘commonly-used’ controls together (Textbox, Checkbox, Combobox, Label, etc.) into a single library.