I am planning to write a control that inherits from a third party ActiveX control. The requirements are:
1) It should be able to be added from the toolbox in Visual Studio
2) It should be able to hide all the base class members and only provide access to the members from the derived class. (the derived class will provide several custom events and functions)
One solution is to not use inheritance at all, have a class that would declare the ActiveX control private and initialize it dynamically at run time. However, this does not satisfy my first requirement. Is there a way I could achieve the functionality I want.
PS: I do not have access to the source code of this control
You can make your solution (composition) work by using a simple Panel control as the containing class.
There is no way to (really/effectively) hide base class members when using inheritance.