As an alternative to creating ActiveX Documents with Visual Basic, Text Control can also be used directly as an ActiveX object in HTML code. To include a Text Control in HTML code, it is declared as an object:
<OBJECT classid="clsid:b89a2c01-99dd-11e6-a5ed-0013d350667c" id=objTX width=600 height=400 > <PARAM NAME="ViewMode" VALUE="2"> <PARAM NAME="ScrollBars" VALUE="3"> <PARAM NAME="PageWidth" VALUE="12240"> <PARAM NAME="PageHeight" VALUE="15840"> </OBJECT>
The "classid=" statement specifies Text Control's class ID, which Internet Explorer can use to locate it. (Note that this declaration requires that a Text Control has already been installed on your computer. We will later add a CAB file reference so that it can automatically be loaded and installed from a file server or the Internet.) The "id=objTX" statement assigns a name to the object which is used to access it from program code. The remaining lines set the width and height, and assign some initial values to some of Text Control's properties.