ActiveX Controls technology (new in Visual Basic 5)

Visual Basic 5 includes everything you need to create complete, stand-alone ActiveX controls from scratch. However, it is much more likely that these features will be used as discussed below.

Subclassing and customizing an existing ActiveX control Developers can take advantage of more than 2000 commercially available ActiveX controls. An existing control can be subclassed, customized, and then compiled, creating a custom version of the same control. An example of this is using a multiline text box as a postal address box by limiting it to a number of lines of a certain length. The compiled result will be a custom ActiveX control featuring this new functionality.

Aggregating multiple ActiveX controls into a composite control Developers can take advantage of the many commercially available ActiveX controls by aggregating multiple controls into an ActiveX control project, customizing their look and behavior, and then compiling the group of controls together into a single control. The resultant control could then be inserted into a Web page or a client/server application to “wrap,” or contain, all of the user interface elements of that application. Microsoft anticipates that this will be a popular way for developers to share interfaces and code, thus gaining valuable reuse capabilities. An example of this is adding a second text box to the multiline example just mentioned to capture the postal code and then using the resultant composite control. The compiled result will be a custom ActiveX control featuring this new functionality.