ActiveX -- you have probably heard the term a few times at this point, haven't you? Most people hear the term ActiveX as it relates to their use with their Internet browser software. There's more to the story. ActiveX controls are the present and the future of modular software objects in the marketplace.
To learn what an ActiveX control is, let's first do an object-based software primer. For a moment, think of all the pieces of software running on your PC as "black boxes". We'll call those black boxes objects. Don't worry about what they do, for now. All you know is that you setup certain parameters, tell the software to do something, and you get results. Well if all these pieces of software are going to play together nicely, they all need to be setup, activated, and provide results in a consistent fashion. Microsoft's Component Object Model (called COM for short), the basis for all of Windows95 and NT, defines the way these software objects can interact as follows:
• Properties - These settings define what the software object will do when you say "go" -- think of properties like setup parameters on a machine that can make a variety of parts.
• Methods - Once you've setup the properties, you need to say "go do something" to the object. Like a machine that may have several buttons an operator can push to activate it, an object can have several methods that cause different things to happen. When you call a method from another program, depending on the method it looks at some or all of the properties, and executes some code inside that does something, which leads us to the results.
• Events - When you set properties and invoke a method, you expect something to happen. You expect some output or results from your object. The results are called events. When the event happens, the object may display something on the screen, it may just pass some parameters back to your other program as a result, or it may do nothing but say "I've done what you said, if you want the data, come and get it".
An ActiveX control is an implementation of a software module based on the COM specification. The ActiveX control specification defines these standard interfaces. Take your Excel97 spreadsheet as an example. Did you know that Excel itself and every workbook you create is really just a big collection of objects? Every cell is an object. If you add a chart, that's an object. Every worksheet in the workbook is an object. When you click on the pull down menus and change formatting of text, you are setting properties on objects. When you print a worksheet, you are calling Excel's print method! It's really that simple.
For an industrial example, take a look at the ActiveX Control at the right, a PLC communications driver ActiveX control. You have to admit, if you know anything about PLC communications, the interface names used are pretty intuitive. In general, ActiveX controls are not separate applications. They are used inside of some other application such as Excel97, Visual Basic, an HMI package, or an Internet browser. The application that the ActiveX control plugs into is called the container application. The container application and the ActiveX control interact through the standard property, method,and event interfaces described above.
So the next time you're looking at doing a software application, keep ActiveX controls in mind. They could save you hundreds of hours of work by allowing you to purchase at an affordable price a software module that someone else developed and easily interface to the module using a standard interface.
References to learn more: "Understanding ActiveX and OLE - A guide for developers and managers", David Chappell, Microsoft Press.
QUICK LINKS
NEED HELP?
CONNECT
1-888-665-3678 (US)
+1-704-849-2773 (Global),
+1-704-849-6388
© Copyright Software Toolbox, Inc. 1996-2024, All Rights Reserved Worldwide.
Usage subject to our website terms & conditions