Welcome,
 Guest User.

  Click to Login   


 FarPoint HOME
 clubFarPoint HOME

SUPPORT
   Forum
   View Your Questions

RESOURCES
   Search
   Articles
   Product Docs
   FAQ
   Training Videos
   Feature Suggestions
   Subscriptions
   User Groups
   FarPoint Blog

DOWNLOAD
   Updates
   Trials

MY ACCOUNT
   Member Benefits
   MVP Status
   RSS Feeds
   Register Product
   View Products
   View Orders
   Order Now
   My Profile
   Product Profiles

   clubFarPoint Feedback...


There are 12 registered members online.


   

Articles
<< Return to Articles
Adding ActiveX Content to Your Web Pages
Submitted By: FarPoint Last Updated: 4/10/2006 10:19:44 AM
Level: Beginner  
Product(s): Button Objx 2, Calendar Objx 3, Input Pro 3, List Pro 3, Spread 7, Tab Pro 3  
Language(s): Visual Basic 6, Visual C++  
Description: This article explains how to add an ActiveX control (OCX) to your Web page. Included in this article are summaries and instructions.  
 

To view a printable version of this article in a PDF viewer, click here for PDF.


This white paper explains how to add an ActiveX™ control (OCX) to your Web page. Included in this document are instructions and overviews covering

This white paper assumes a basic understanding of HTML (Hypertext Markup Language) and the World Wide Web. If you need more information about creating Web pages, explore the plethora of HTML how-to guides in your local bookstore or on the Web. Due to its nature, this document does not cover the details of code downloading or VBScript™. You can obtain further information on both of these topics from Microsoft .


Brief Background

HTML was designed as a page description language for defining static pages. As originally designed, when users connected to a web site, pages were sent to their browsers and displayed. To change what was shown, a new page had to be loaded. If input was required from users, it was sent back to the web server, processed there, and then new pages were sent back to the users' browsers. No local processing or updates were possible.

With the advent of ActiveX comes the concept of active content . You can embed items that will run on the user's machine in the HTML code that creates a web page. These items can dynamically update their displays or validate user input without accessing the web server. An ActiveX control is a modular piece of software that has its own small graphical interface and can perform tasks, compute information, and communicate to other programs. They can be easily used and reused by any ActiveX-capable program or language, such as Internet Explorer™ and Visual Basic®. For example, the FarPoint Technologies™ Input Pro™ product offers a suite of user entry controls that can format and validate content as a user enters information into the control.

When an ActiveX-capable browser encounters a Web page with one or more ActiveX controls, it checks the user's local system registry to see if those controls already exist on the user's computer. If they do exist, the browser displays the page and activates the controls. If the controls are not already installed on the user's computer, the browser automatically finds and installs the control over the Web. The browser knows where to find the control because the appropriate Web site is coded into the tag that embeds the ActiveX control. By default, ActiveX controls are downloaded into an ActiveX control cache located in the \Windows\occache directory.

ActiveX technology relies on the user's browser being able to run the embedded content, the ActiveX control. For example, the first browser that had native support for ActiveX controls was Microsoft's Internet Explorer 3.0.

For more information about ActiveX in general, see More Resources for ActiveX Information .

Return to top

 


Embedding Active Content: The <OBJECT> Tag

HTML pages are made up of text separated by tags that define how the text should be displayed. You can use specialized tags to display images or to provide a link to another page. Microsoft has decided to use the <OBJECT> tag to place ActiveX controls in HTML pages.

The following example illustrates an object tag:

<OBJECT ID="fpBoolean1" CLASSID="CLSID:DD55D143-EBF7-11D0-8810-0000C0E5948C" CODEBASE="http://www.fpoint.com/max/inputpro.cab"> <PARAM NAME="BorderStyle" VALUE="0"> <PARAM NAME="BorderColor" VALUE="-2147483642"> <PARAM NAME="BorderWidth" VALUE="1"> <PARAM NAME="BooleanStyle" VALUE="0"> <PARAM NAME="TextFalse" VALUE="FarPoint Boolean"> </OBJECT>

The tag has the following parameters:

ID= A name for the object. The name should be unique among all other objects on the page.
CLASSID= A class ID number. Every ActiveX control has a unique class ID that was encoded into it during development. The browser uses this number to determine which control to load.

This number must be exactly correct or the control will not load. Thus, it is preferable to cut and paste these numbers into your object tag or to use a tool such as the ActiveX Control Pad to insert them. For more information, see " Using the ActiveX Control Pad ."
CODEBASE= URL referring to where the ActiveX control can be acquired. When the page is loaded into the user's system, the browser checks the registry to determine if the system has the ActiveX control referenced by the CLASSID. If it does, then the local copy is used. Otherwise, the browser attempts to download the control from the URL designated by the CODEBASE tag.

For details on the intricacies of code downloading, see Microsoft's code download specification.
PARAM NAME="x" VALUE="y" Optional parameters to set properties of the ActiveX control when it is loaded. Each is expressed as a property NAME and a VALUE to set it to. Once the control is loaded, it is given these property settings by the browser. Which settings are supported depends on the ActiveX control.
DATA= An optional parameter providing binary data that sets properties and provides information about the control.

Close the object tag using the (</OBJECT>) tag after the parameter list.

This is not a complete list of possible options in the OBJECT tag, but these are the basic options needed to display a control on a web page. Further information on this tag can be found at the World Wide Web Consortium site, http://www.w3.org , under the topic "Inserting objects into HTML."

Return to top

 


Using the ActiveX Control Pad

Adding controls by hand is not a simple process. The CLSID numbers are unwieldy to type, and it can be difficult to visualize the effects of the parameter settings on the control. To help with these difficulties, Microsoft created the ActiveX Control Pad, which can be obtained from their web site at    


Subscribe to the RSS feed!RSS Subscribe


Click for Morrisville, North Carolina Forecast
 
Todays Trivia














FarPoint's Spread for Web Forms

     About Us | Contact UsComments & Suggestions | ©2008 FarPoint Technologies, Inc.