The Visual Designer

The visual designer, or design-time object, manages the design-time aspects of the ActiveX designer. The visual designer creates and destroys windows, handles the user interaction, and controls the look and feel of the ActiveX designer within the host environment. It also provides information about the objects in the ActiveX designer and allows browsers, wizards, and other tools to manipulate them. All ActiveX designers must provide a visual designer.

Using the visual designer, end users can not only create objects and use their properties, methods, and events, but also can write application-specific code to manipulate the objects they create. The end user's code and objects become part of the executable application, or run-time object. The run-time object may be the same as the visual designer, or it may be different.

ActiveX designers may have different design-time and run-time objects for the following reasons:

If the run-time object can be different from the design-time object, the ActiveX designer must provide information describing the types and visual representation for the run-time object. Languages such as Visual Basic use this information when creating an executable file. It must also implement a class factory that can create instances of the run-time object.

If the run-time object and the design-time object are the same, the ActiveX designer uses the same type information and class factory at both design time and run time.

For example, ActiveX designers that define forms or forms packages often require the same type information at design time as at run time. Their design-time and run-time objects are usually the same.

Other kinds of ActiveX designers may have different requirements for type information or user interfaces, and therefore implement separate design-time and run-time objects. An ActiveX designer that allows its users to devise queries to remote databases, for example, may not need a user interface at run time. And an ActiveX designer used for creating multimedia objects is likely to need different type information at run time.