Viscom Software Image Thumbnail CP ActiveX Control


Assuming that you have already run the Image Thumbnail CP ActiveX Control installation program and started Microsoft FrontPage, the next step is to create a project.  Then use the "Insert/Advanced/ActiveX Control.." command to include the file "Image Viewer CP Pro ActiveX Control" into the new project

Select Control
Click Customize button select the Image Thumbnail CP Control

Click OK to insert the ActiveX control.

The code as following:

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>

<body>

<p>

<object CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331" width="14" height="14"><param NAME="LPKPath" VALUE="imagethumbnail.lpk"></object>

<object classid="clsid:797D023E-E647-45DD-8B81-2F574238FE8F" id="ImageThumbnailCP1" width="479" height="466">
<param name="_Version" value="65536">
<param name="_ExtentX" value="12674">
<param name="_ExtentY" value="12330">
<param name="_StockProps" value="0">
<param name="EnableDropFile" value="-1">
<param name="EnableDragFile" value="-1">
<param name="ClipFontBold" value="0">
<param name="ClipFontItalic" value="0">
<param name="ClipFontUnderline" value="0">
<param name="ClipFontName" value="Arial">
<param name="ClipShadowColor" value="0">
<param name="ClipHighlightColor" value="12566442">
<param name="ClipTextColor" value="0">
<param name="ClipBorderColor" value="8421376">
<param name="ClipColor" value="16777215">
<param name="BackgroundColor" value="14215660">
<param name="ClipHeight" value="100">
<param name="ClipWidth" value="100">
<param name="ClipFontSize" value="8">
<param name="ClipTopMargin" value="0">
<param name="ClipBottomMargin" value="0">
<param name="ClipFontTopPos" value="0">
<param name="LoadMultiPage" value="-1">
<param name="AllowDuplicate" value="-1">
<param name="LicenseKey" value="Demo">
</object>
<br>
</p>

<p>File Name: e.g. c:\test.jpg <input type="text" name="txtFile" size="20"><input type="button" value="Add" name="btnAdd"> 
<input type="button" value="Delete Selected Clip" name="btnDelete"> </p> 

<input type="button" value="Delete All" name="btnDeleteAll"> <input type="button" value="ACDSee Style" name="btnAcdSee"> 

<input type="button" value="Normal Style" name="btnNormal"> 



<script LANGUAGE="VBScript"> 

Sub btnAdd_onClick

ImageThumbnailCP1.AddClip txtFile.value,""

end sub

Sub btnDelete_onClick
ImageThumbnailCP1.DeleteSelectedClip
end Sub 

Sub btnDeleteAll_onClick

icount = ImageThumbnailCP1.ClipCount

For i = 0 To icount

ImageThumbnailCP1.DeleteClipByIndex 0
Next


end Sub

Sub btnAcdSee_onClick

ImageThumbnailCP1.BackgroundColor = RGB(128, 128, 128) 
ImageThumbnailCP1.ClipBorderColor = RGB(128, 128, 128)
ImageThumbnailCP1.ClipShadowColor = RGB(128, 128, 128)
ImageThumbnailCP1.ClipColor = RGB(128, 128, 128)
ImageThumbnailCP1.ClipFontSize = 10
ImageThumbnailCP1.ClipFontName = 12
ImageThumbnailCP1.ClipFontTopPos = 95
ImageThumbnailCP1.ClipTopMargin = 0
ImageThumbnailCP1.ClipBottomMargin = 15
ImageThumbnailCP1.ClipWidth = 110
ImageThumbnailCP1.ClipHeight = 120


icount = ImageThumbnailCP1.ClipCount

For i = 0 To icount
ImageThumbnailCP1.SetClipInfo i, "", " Demo " + Trim(CStr(i))
Next

end sub

Sub btnNormal_onClick

ImageThumbnailCP1.BackgroundColor = 14215660
ImageThumbnailCP1.ClipBorderColor = 8421376
ImageThumbnailCP1.ClipShadowColor = 0
ImageThumbnailCP1.ClipColor = 16777215
end Sub

</script>


</body>

</html>

When a web page contains ActiveX controls, these controls must be downloaded to the machine of the person viewing the web page. Therefore, each person viewing the page receives a copy of the controls on the web page. Licensing prevents the unlicensed use of controls downloaded in this manner.

ActiveX controls usually require a license file (.LIC) file to be used in a development environment. The .LIC file lets the creators of the control distribute it while protecting their ownership. When a browser loads an ActiveX control, it checks for the control's licensing. However, third-party owners of ActiveX controls do not allow you to distribute their .LIC files.

To allow ActiveX controls to work in browsers without the need for distributing .LIC files, Microsoft developed the license package (.LPK) concept. Each .LPK file contains run-time licensing information for all the ActiveX controls on a given web page. When the page is loaded into a browser, each control on the page is checked against the .LPK file. If the control is correctly referenced there, it is allowed to load. Otherwise, a license violation message is displayed. When you are developing pages using third-party controls, you must create an .LPK file for each page containing references to all the ActiveX controls directly on that page. You do not have to have run-time licensing information for ActiveX controls that are inside other objects on the page.

You can create an .LPK file using Microsoft's License Package Authoring Tool (LPK_TOOL). The tool is part of the Internet Client SDK (in the \bin subdirectory), available from the Microsoft website at http://www.microsoft.com.

In Image Thumbnail CP ActiveX Control setup disk. You can find imagethumbnail.lpk in REDIST folder, so you do not need create a run-time license using LPK_TOOL. Place the .LPK file on your website in the same directory as your HTML files.