Lesson 4: ActiveX Code Components

Automation with ActiveX

ActiveX code components provide functionality to client applications through OLE Automation. A client application uses a component's code by creating objects and calling their properties and methods . A server component contains functionality that a client uses. Some components , including Microsoft Access, can act as either a client or server component. However, a single component cannot act as both the client and the server.

click to view at full size.

Figure 8.3 How ActiveX code components work

Automation makes it possible for one application to manipulate objects implemented in another application. Automation is built on COM technology, which makes it possible for objects to expose functionality to other objects or applications. Exposing programmable objects enables clients to access objects directly as well as the functionality that they provide. For example, a word processor can expose its spell-checking functionality so that other programs can use it. Thus, automation makes it possible for vendors to improve their applications' functionality by using ready-made functionality from other applications.

Using automation, two or more components can be integrated in a way that appears seamless to the user . Using objects through automation is very similar to working within a single object because the server object's properties can be set or retrieved and its methods can be applied.



Microsoft Windows Architecture Training
Microsoft Windows Architecture for Developers Training Kit
ISBN: B00007FY9D
EAN: N/A
Year: 1998
Pages: 324

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net