Table of Contents

Usage with the Internet: CAB File



Be sure to read and understand the license agreement before distributing your applications that use the Flipper CAD Control.

 

This topic covers your options for using the control within a web page. If your web browser supports ActiveX containment and scripting, you can manipulate the control within a web page.
 

When using the control on a web page, there are considerations regarding installation of the control. The control must be on the target machine or be downloaded across the Internet. To avoid your clients having to download the control, perform local installs of the run-time library (see Distributing Your Applications).

 

This follwing topics discuss how to use the control in the Microsoft Internet Explorer (referred to as IE):
 

Licensing Issues - The LPK File
Downloading the Control From the Server- The CAB File
Scripting
Internet Explorer Browser Safety Levels and Control Behavior

 

Licensing Issues - The LPK File

The flpcad.lpk file provides clients that do not have the control installed locally with a run-time license. It can be found wherever you installed the Flipper CAD Control.

Note the the flpcad.lpk file should be treated the same as the license file; it is NOT to be distributed to client machines. You may use flpcad.lpk on one server location, as you would the license file.

In your HTML page, you must insert an <OBJECT> tag for the License Manager object before any other <OBJECT> tags. The License Manager is an ActiveX control that is installed with Internet Explorer. Its CLASSID is shown below. Set the LPKPath property of the License Manager object to the path and name of the LPK file. You can have only one LPK file per HTML page.

<OBJECT CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331">
<PARAM NAME="LPKPath" VALUE="flpcad.lpk">
</OBJECT>

 

Downloading the Control From the Server- The CAB File

The flpcad.cab file enables clients to download a run-time version of the control. In your HTML page, you must insert an <OBJECT> tag for each instance of the control. The control's CLASSID is shown below, along with an example location of the CAB file (set with the CODEBASE tag). The NAME tag is the name used to reference the control in scripting. The WIDTH and HEIGHT tags are used to set the size of the object in pixels.

<OBJECT ID="FlpCAD1" NAME="FlpCAD1"
CLASSID="clsid:F97D446A-3364-11D1-A060-00C04FC32E79"
CODEBASE="file://c:/mywebpagedirectory/flpcad.cab"
WIDTH="300"
HEIGHT="200">
</OBJECT>

 

Scripting

The follwing is a sample of manipulating the control with VBScript. As you can see, it is no different from regular programming, although VBScript and JavaScript are lightweight versions of there respective languages and may not provide all of the functionality that you are used to.

<P><SCRIPT LANGUAGE="VBScript"><!--
     FlpCAD1.BackColor = RGB(200, 200, 200)

     FlpCAD1.LayerBrushFg(1) = RGB(255, 55, 55)
     FlpCAD1.LayerBrushBg(1) = RGB(77, 77, 230)
     FlpCAD1.LayerBrushStyle(1) = 4
     FlpCAD1.LayerBrushMode(1) = 2

     FlpCAD1.ViewSnapToShape = 0
     FlpCAD1.ViewSnapToGrid = 0
     FlpCAD1.ViewMouseTool = 1
--></script></p>

 

Internet Explorer Browser Safety Levels and Control Behavior

The Flipper CAD Control is a signed control. Read the following to be aware of what this means.

The following enclosed in double-quotes is from MSDN online help:
 

"A browser has options for safety level, configurable by the user. Because Web pages can contain active content that might potentially harm a user's computer, browsers allow the user to select options for safety level. Depending on the way a browser implements safety levels, a control may not be downloaded at all, or will display a certificate or a warning message to allow the user to choose at run time whether or not to download the control. The behavior of ActiveX controls under high, medium, and low safety levels on Internet Explorer is listed below.
 

High Safety Mode

Medium Safety Mode

Low Safety Mode

 

See Also

Distributing Your Applications, License Agreement, Usage with the Internet: ASP (Active Server Pages)

 

Last modified on: Tuesday, February 04, 2003