Suite101

Attributes for ActiveX objects


© Maxim Karetnikov

The table 1 summarizes most useful tag attributes for ActiveX objects. Some of the attributes shown in the table aren't new to HTML. For instance, the ALIGN, BORDER,HEIGHT, HSPACE, VSPACE, and WIDTH attributes are used  with the <IMG> tag. However, because the <OBJECT> tag is part of an advanced specification, it supports the advanced alignments and spacing techniques

 

Table 1
Attribute Name Description
ALIGN The alignment of the object
BORDER The border width to use if the object is a hyperlink
CLASSID Identifies the object's class
DATA URL for the object's data
HEIGHT Sets the object's height
HSPACE Sets the horizontal spacing around the object
ID An identifier for the specific instance of the object
NAME A name to identify an object submitted in a form
TYPE The MIME type for the object's data
STANDBY Text to display while the object and data are loaded
SERVER URL where the control can be installed from
VSPACE Sets the vertical spacing around the object
WIDTH Sets the object's width

CLASSID Attribute

The CLASSID attribute was slightly touched in the previous lessons. When your browser downloads a control and you choose to install it, the control is registered in the Windows registry, a registry for applications on your system. To make sure operating systems can uniquely identify applications, such as your ActiveX controls, each application has a globally unique identifier (GUID). Based on the CLSID value, your system starts the appropriate control. Without a proper CLSID, your system doesn't know which control to use, so the control isn't started. When you use controls in Web pages, you need a way to tell your system about a control; you do this with the CLASSID attribute of the <OBJECT> tag. With the CLASSID attribute, you refer to controls by their CLSID value, such as this one:

<OBJECT CLASSID="clsid:99B42120-6EC7-11CF-A6C7-00AA00A47DD2">

The easiest way is through the Registry Editor, which you can run by starting the regedit.exe application. The Registry Editor files entries by category into directories. For OLE and ActiveX objects, the directory need to examine is the HKEY_CLASSES_ROOT directory. Although the Registry Editor features a Find function under the Edit menu, it's useful

Go To Page: 1 2


The copyright of the article Attributes for ActiveX objects in VB Script is owned by Maxim Karetnikov. Permission to republish Attributes for ActiveX objects in print or online must be granted by the author in writing.

Post this Article to facebook Add this Article to del.icio.us! Digg this Article furl this Article Add this Article to Reddit Add this Article to Technorati Add this Article to Newsvine Add this Article to Windows Live Add this Article to Yahoo Add this Article to StumbleUpon Add this Article to BlinkLists Add this Article to Spurl Add this Article to Google Add this Article to Ask Add this Article to Squidoo