| OCX Controls & software technologies |
![]() |
Internet Explorer and Visual Interdev users
This page is dedicated to all the non-professional web developers who have never used an ActiveX control before and would like to learn the basics and a quick hands-on start. In this tutorial we will build a digital clock embedded in an HTML page, using Precision 7 Segment Digital Display, nevertheless this tutorial should be useful even for the use of the other Precision controls. |
Our controls can be embedded inside web pages. Please note that in order for the page which contains them to correctly appear, the referenced ActiveX/OCX controls must be installed and registered on the client computer. It is your responsibility to package, distribute and deploy, taking care for installation methods and possible security problems. We suggest the generation of an automated installation self-extracting package, such as InstallShield or Wise Installer.
IMPORTANT NOTICE: please note that the product license does not allow you to redistribute to the public any code which includes your license number in a plaintext form, thus including HTML files instantiating our controls and including a call to SetLicense() line. This limitation does not apply to you if your web page is browseable only from computers and persons belonging to your organization. In order to overcome license limitations and completely avoid the need of an installation package to distribute the controls, we suggest to prepare a dedicated visualization program containg our controls, to capture the screen with Precision Display Capture and send the resulting image to the client web browser.
Warning: for some reasons that could not be identified, our controls could redraw strangely while using the Visual InterDev integrated development environment. These strange behaviours are transient and have no effects at all over the final product (the HTML page you are writing) and the way it will be actually shown inside Internet Explorer.
In fact all of our controls work correctly with both Internet Explorer and Visual InterDev. Some of our controls in version 1.0 had incompatibilities with Internet Explorer and Visual InterDev and caused unexpected crashes; all of these problems have been solved in versions 1.1. If you bought these controls in version 1.0, you can download and use version 1.1 for free!
Click here to download this example (a zip file containg a simple HTML file, 1 kb).
|
|||
| |||
| The HTML and Javascript code is as follows:
<HTML>
<HEAD>
<TITLE>Example</TITLE>
</HEAD>
<SCRIPT LANGUAGE="Javascript">
<!--
function initActiveX()
{
// Modify the following line inserting your license number
DDigital7SegmentsDisplay1.SetLicense( <put here your license number> );
setTimeout("updateClock()",1000);
self.status = "Setting timer..."
}
function updateClock()
{
setTimeout("updateClock()",1000);
var today = new Date();
var hour = new String(today.toString());
self.status = hour;
hour = hour.substring(11,19);
DDigital7SegmentsDisplay1.DisplayedString = hour;
}
//-->
</SCRIPT>
<BODY onLoad="initActiveX()">
<P>
<OBJECT classid=clsid:324B9029-CA00-11D3-80FB-00C00C02203E id=DDigital7SegmentsDisplay1 style="HEIGHT: 56px; WIDTH: 224px">
<PARAM NAME="_Version" VALUE="65536">
<PARAM NAME="_ExtentX" VALUE="5927">
<PARAM NAME="_ExtentY" VALUE="1482">
<PARAM NAME="_StockProps" VALUE="1">
<PARAM NAME="BackColor" VALUE="16777215">
<PARAM NAME="DisplayedString" VALUE="--:--:--">
<PARAM NAME="Style" VALUE="0">
</OBJECT>
</P>
<FONT FACE="Verdana, Tahoma, Arial, Helvetica, swiss" SIZE=2>
This example illustrates how to use <I>Precision Digital 7 Segment Display</I>
inside a web page. Please note that it is normal to observe a <B>runtime
syntax error</B> when loading this file in its unmodified state.
<P ALIGN=JUSTIFY>
Please open this file as an HTML source, locate the body of function
<CODE>initActiveX()</CODE> at the beginning
of the file, find the following line: <BR>
<CODE>DDigital7SegmentsDisplay1.SetLicense( <I>put here your license number</I> );
</CODE><BR>
and insert your license number.
</FONT>
</BODY>
</HTML>
|