Joined: 18 Jul 2005
|Posted: Sun Jul 31, 2005 6:48 am Post subject: HOWTO : Use ShComboBox ActiveX Control on an HTML or ASP page.
|Beginning with version 4.3 the developer must use the LPKTool to use the control on an HTML or ASP page as described below (Before running the LPKTool the control must already be properly licensed on the developer's machine) :
1.Run the LPKTool which you can download from [url]http://msdn.microsoft.com/downloads/Default.aspx [/url](Search for the term "lpk" on this web page).
To have Internet Explorer automatically download the shcmb012.ocx file on a target computer which doesn't have the file installed, you must package the shcmb012.ocx file in a cab file and specify the cab file in the CODEBASE attribute of the shcombobox object tag as shown below :
2.Select "LogicNP Software ShComboBox ActiveX Control" from the list of the ActiveX Controls shown and then click on "Save and Exit" to save the license file. Specify control.lpk as the filename or you can specify your own filename.
3.In the HTML or ASP page that is using the control, add the following after the <BODY> start tag :
<PARAM NAME="LPKPath" VALUE="control.lpk">
The object tag shown above needs to precede any other object tags on your page. This tag loads the Microsoft license processor which manages licensed ActiveX controls on a web page.
4.Insert the ActiveX Control in the HTML or ASP page manually or using an HTML editor like Visual InterDev or Dreamweaver.
classid=clsid:B5E54060-0DD4-4292-8FC6-3C6C8A8FBA8E codebase="shcmbbox.cab" height="300" id=shCmbBox style="LEFT: 0px; WIDTH: 405px; TOP: 0px; HEIGHT: 255px" ></OBJECT>
To make a CAB file for shcmb012.ocx, you will need the Cabinet SDK (downloadable from http://download.microsoft.com/download/platformsdk/cab/2.0/w98nt42kmexp/en-us/Cabsdk.exe )
After you have installed the Cabinet SDK, run the cabarc.exe tool that comes with it as follows :
cabarc.exe n shcmbbox.cab shcmb012.ocx
The above command line creates a new cabinet file named shcmbbox.cab and adds shcmb012.ocx to it.