ActiveX Control Objects


Let’s look at some other ways of getting objects. Here’s the most common. Stories, Inc., decides that the StoryTeller application is overkill for many users. What users want is a fast DLL version of StoryTeller’s components. This version should have a visual interface for initializing property values, and it should be able to respond to story events, such as audience laughter or boredom. In other words, it should be an ActiveX control. So they write STORYSPINNER.OCX in a language that they won’t specify and that is none of your business anyway (but that might be Visual Basic). You click the Toolbox to put this control onto a form. Visual Basic automatically provides hidden code that does the following:

Set spinner = New CStorySpinner

You don’t have to Set this variable. It’s pre-Set. You also don’t have to initialize its properties with code (although you can) because you probably already set them at design time in the property page.