Doug's look at ActiveX Controls in Webpages  

Microsoft is a strong player in the Internet Race for Dominance. There is a constant battle with Netscape and Sun Microsystems for which "standards" to use. The Internet being the beautiful, chaotic thing that it is will try to embrace what it can and/or what ever becomes the defacto standard. Microsoft launched a campaign last year to make ActiveX the "next great thing" for Web authoring. ActiveX is a very powerful tool and is being implemented by many websites. A PC running windows and the latest applications from MS will eventually be able to interface with all MS applications and the Internet seamlessly. Netscape is moving toward the same end; only using Java and HTML, which are somewhat less proprietary than ActiveX Controls and Visual Basic. Some experts see a "blending" of all these technologies. Microsoft is giving a version of Visual J++ away that supports the creation of ActiveX Controls (or so I understand). My Experience with MS software is that it tends to "lean" the way that MS wants it to. I think it would behoove Microsoft and benefit the rest of the Web community if we had a highly functional common HTML standards. The specifications for HTML3.2 support the new tags and necessary definition for ActiveX Controls and Cascading Style Sheets. We are moving into another generation of Webpages. Layering of HTML documents and precise placement of elements and objects will add new dimensions, both visually and interactively. ActiveX Controls are meant to do this for the Internet Explorer browser. The Control Pad supplied by Microsoft (for free) supports both VBScript and JScript (MS implementation of JavaScript). With it and the right controls installed you have a good start toward this goal. 
There are, of course, some catches. First, ActiveX Controls have two parts, a run time module and a design time module. If you want to place the control in your page you must have the design time module. If you want the people viewing the page to see and use the page they must have the run time module for that particular control. Here's where it gets interesting. IE 3.0 and above will automatically download and install these controls with the page (IE3.02 full version has the Layout Control built in). You will be prompted with a "certificate" window to allow MS and/or  other commercial vendors to upload controls AUTOMATICALLY WITHOUT PROMPTING (see what I mean by "leaning"). Pretty convenient, huh? It is, but you may wish to maintain your autonomy for a while. There are many controls on many pages; you may wish to pick and choose. Also most of them don't seem to give you a choice of where to download the controls to on your system.  So, if you notice after visiting many ActiveX sites your C: drive is getting overloaded, well......? The other thing is you will have to know the "codepage" (URL of the run time module) where the control is stored on your server or another. This codepage property must be included in the control on your page so the run time module can be installed on the computer of the person trying to download your page. This is a little complicated, compared to just linking to a plugin vendor for Netscape. The good thing is that controls for the most part auto install on Windows95 pretty cleanly. Microsoft would like ActiveX Controls to become dominant in Webpages and browsing, and is moving to make them cross-platform with conversions for Mac and other OSes. Also, many vendors are porting ActiveX Controls to Java, so they are available as Java Beans or some such coffee metaphor. The future will tell us who had the right idea, and hopefully, the people at W3 Org are watching out for us. 

The use of ActiveX Controls on your webpage basically limits those that can see your creation to users of Internet Explorer 3.01 or above. I've tried the ScriptActive plugin for Netscape and didn't find it very useful. If you'd like to try it for yourself Techweb has an article you might want to read first. Netscape is suppose to include some support for ActiveX in Communicator 4.0, but it is not expected to be much better than Microsoft's support of Javascript. It would be nice if they would stop jockeying for position, and give Webauthors a common ground to work on that is less platform/program specific. 

Moving right along. The first thing you will need to do if you want to learn how to use ActiveX Controls on your webpage is download the ActiveX Control Pad and make sure you are running MS Internet Explorer 3.02 or higher. You need the full version of MSIE, because it has the HTML Layout Control built in (Microsoft is building ActiveX technology into all of its latest software) . The HTML Layout Control allows WYSIWYG placement of objects and "2D" control of them, plus overlapping of objects. 

I strongly recommend you to use your regular HTML editor to create your page then open the file in Control Pad to add Controls and scripting. If you are using a plain ASCII text editor now to create pages then the Control Pad's editor might suffice for you.  Anyway, using the Control Pad is a little cryptic to say the least.  The documentation for the Control Pad is the Help files, so it is necessary to go to them pretty often at first.   It would be great if Microsoft included and/or required third parties to include a help file with every control. As it is, you must go through one of their tutorials .  These tutorials aren't crystal clear either.  One of the problems I had was figuring out where the HTML Layout control actually was.  I know, it sounds stupid, but it wasn't packaged with the other controls.  You have to go into the File Menu and pick New HTML Layout.  This puts you in "Layout" mode.  In the Layout mode, you can choose different controls and place them on your page.  You can edit them, size them and use the Script Wizard to make them interact with the other objects (controls?) on the page. 

The Script Wizard is a great part of the Control Pad (hereafter, called the Pad), especially for HTML authors that don't know any JavaScript or VBScript.  It writes the script and places it in the right place in the HTML document.  Great!! (Take a hint, Netscape).  All you have to do in the wizard is pick an event (mouse click?) and then pick an action from the other pane of the window (change the text in a label?).  I'm over simplifying it a little, but basically that's it.  The events/actions that have to be completely scripted in Netscape are automated in the Pad.  I don't think the Pad recognizes objects or scripts created in an editor other than the Pad.  Maybe when other browsers are capable of recognizing the new <Object> tag I'll be further able to test it. 

In Layout Mode, once you have the controls where and how you want them, then you have to save them as an .alx file.  Then you open a HTML file (we're still in the Pad) and somewhere within the <Body> of the document you insert the .alx file using Insert HTML Layout from the Edit Menu.   You can have multiple .alx files within a document, but there is some limitation as to their interactivity.   If this sounds complicated it is, but it is a whole lot more simple than writing all the HTML and JavaScript or VBScript yourself. 

You can also edit the controls by loading the HTML file in the Pad's "HTML source" editor and clicking on the appropriate icon on the left side of the window.  Scripts, Layouts and ActiveX Controls all have a specific icons. Individual controls can be defined in this editor also, but can only be placed in the document with standard HTML tags.  Hopefully, Microsoft will simplify the Pad and refine its functions when it gets around to revamping the Pad to comply with the latest specification for HTML.  They say they will in their white paper on the subject.  If that happens you'll see a lot of people jumping on the ActiveX bandwagon. 

There are many existing ActiveX Controls that come with IE and the Pad, and there are a great many more available from third party vendors.  Some of them are available on the Web for free and demo purposes.  The better ones cost quite a bit.  I expect many more will pop up as more developers get involved.  Below is a list of ActiveX resources.  Get started! 


Microsoft's Sitebuilder Network 
Techweb's ActiveXpress 
C/net's ActiveX.com 
ZDNet ActiveX-files 
Microsoft's Dynamic HTML Reference 





Any comments or suggestions e-mail Doug 
or visit
Doug's Home Planet