Java Reference
In-Depth Information
ActiveX controls are a little like mini-programs, usually created in languages like C++ or Visual Basic. Unlike
normal programs, like Notepad or Microsoft Word, ActiveX controls cannot run on their own; they need to
be sited in a container program. Not all programs can act as containers for ActiveX controls, only those specifi -
cally designed to do so, such as Microsoft Access and, of course, Internet Explorer. When the creators of the
ActiveX control compile their code, they also assign it a unique identifi cation string that enables program-
mers like you to specify exactly which control you want to embed in your IE ActiveX container.
Adding an ActiveX Control to the Page
Adding an ActiveX control to a page for an IE browser requires the use of the <object/> element. Two
very important attributes of the <object/> element are common to all controls, namely classid and
codebase. The classid attribute is the unique ID that the creator of the control gave to it when it was
compiled. The codebase attribute gives a URL where the ActiveX control can be found — you'll look at
this attribute in more detail in the next section.
How can you fi nd out the classid? Well, one way to do this is by checking the documentation that
came with the control or is available on the control creator's web site. If you have the control installed,
another way to do this is via IE itself, which will tell you which controls are installed on the computer
and available to IE. Also, IE gives you additional information such as classid, though it won't inform
you about any controls that were installed with the operating system. For example, Flash 3 is installed
with Windows 98 and therefore won't appear.
To get this information, open up IE and select Internet Options from the Tools menu, as shown in
Figure 13-4.
Figure 13-4
Search WWH ::




Custom Search