>Hi,
>
>I like to learn more about creating class library for my application use.
>However, I often encountered the problems of not know whether which
>control especially ActiveX which I am using can be sub-class from.
>
>For example, I am creating a new class, to include a timer and 02 ActiveX
>controls, since it can simplify my coding. However, I do not
>know to sub-class from form, custom or control ? Please advise
>and help. Thank you
Virusim,
I do like this :
Create a test form and put controls on it.
Add code to controls till I get the effect I want and add some form props-methods as necessary.
In controls' code instead of saying thisform I say this.parent (or this.parent.parent) and use with...endwith to possible extent.
When I'm satisfied with behaviour I select the controls and Saveasclass (selected controls). This creates a 'container' based class.
I modify the saved class to copy&paste properties-methods formerly added to the form (either visually or by hacking the .vcx).
Last step sounds to be cumbersome but since it reduces testing phase (as a form) it's something I can live with (IMHO better than directly creating container and adding it to form for testing).
As another final step I put the class to a new test form and test.
Cetin