ActiveX version of the Gantt Chart is not working
Details
Date:10/16/2008 5:32:00 AM
Product:ActiveGanttVC Gantt Chart / Scheduler Component
Framework:Visual Studio 6.0
Version:2.7.0.0
User's Development Environment:Internet Explorer
Subject:ActiveX Demo does not work
Question

I've downloaded the ActiveGanttVC, but the active x demo doesn’t work on my machine.

Answer

Answer:

ActiveGanttVC will work on a regular htm page. The bare minimum is the following:



<OBJECT CLASSID="clsid:5220CB21-C88D-11cf-B347-00AA00A28331">
    <PARAM NAME="LPKPath" VALUE="ActiveGantt.lpk">
</OBJECT>

<object id="MSXML4" classid="clsid:88d969c0-f192-11d4-a65f-0040963251e5" codebase="msxml4.cab#version=4,10,9127,0" type="application/x-oleobject" STYLE="display: none"></object>

<object classid="clsid:C488D33A-917B-4D9F-A2DF-61FC1614005C" id="ActiveGanttVCCtl1" width="722" height="442" CODEBASE="ActiveGanttVC.ocx">

  <param name="_Version" value="65536">

  <param name="_ExtentX" value="19103">

  <param name="_ExtentY" value="11695">

  <param name="_StockProps" value="0">

  <param name="AllowSplitterMove" value="1">

  <param name="AllowColumnSize" value="1">

  <param name="AllowAdd" value="1">

  <param name="AllowEdit" value="1">

  <param name="AllowRowSize" value="1">

  <param name="AllowRowSwap" value="1">

  <param name="AllowColumnSwap" value="1">

  <param name="AllowTimeLineScroll" value="1">

  <param name="FlickerFree" value="1">

  <param name="ScrollBarsVisible" value="1">

  <param name="ScrollBarBehaviour" value="1">

  <param name="TimeBlockBehaviour" value="0">

  <param name="ErrorReports" value="0">

  <param name="EnableObjects" value="0">

  <param name="CurrentLayer" value="0">

  <param name="BorderStyle" value="2">

  <param name="MinRowHeight" value="5">

  <param name="MinColumnWidth" value="5">

  <param name="AddMode" value="0">

  <param name="EditMode" value="0">

  <param name="OLEDragMode" value="0">

  <param name="OLEDropMode" value="0">

  <param name="BackColor" value="16777215">

</object>

Let me explain all the sections:

This section is to grant licenses to end users of the control, this is so that the end users can use the control in design mode. VBScript and JavaScript require to have programmatic access to control. Every Control has a design time license, and without it if you cannot design software, you can run the control but not say paste it on a form in Visual Basic, because it will say something like (the control has no design time license). So this ActiveGantt.lpk contains the design time licenses in encrypted format. This file is created by using the lpktool.exe provided free by Microsoft, and in this example ActiveGantt.lpk is in the same folder as the HTML page.


<OBJECT CLASSID="clsid:5220CB21-C88D-11cf-B347-00AA00A28331">
    <PARAM NAME="LPKPath" VALUE="ActiveGantt.lpk">
</OBJECT>

This next section defines XML4, and is not really necessary unless you want the control to serialize to and from XML. The Codebase attribute points to the msxml4.cab file which will be downloaded and installed in the end users machine. Needless to say msxml4.cab must be in the same folder or virtual directory as the HTML page, in this example.


<object id="MSXML4" classid="clsid:88d969c0-f192-11d4-a65f-0040963251e5" codebase="msxml4.cab#version=4,10,9127,0" type="application/x-oleobject" STYLE="display: none"></object>

This last section is for the ActiveGanttVC control. The codebase attribute will download and install ActiveGanttVC.ocx in the end users machine. Needless to say ActiveGanttVC.ocx must be in the same folder or virtual directory as the HTML page, in this example.


<object classid="clsid:C488D33A-917B-4D9F-A2DF-61FC1614005C" id="ActiveGanttVCCtl1" width="722" height="442" CODEBASE="ActiveGanttVC.ocx">

Then there comes the list of uppermost properties of the ActiveGanttVC control (that does not include objects). If you have frontpage you can create a blank HTML page and easily insert ActiveGanttVC into it without doing any coding. As far as clsid’s and other attributes they must be left as is for all three sections. A classid does not change neither for the lpk part, or the XML4 part or for ActiveGanttVC.

 

All trademarks are property of their respective holders, and are only used to directly describe the products and services being provided. Their use in no way indicates any relationship or endorsement between The Source Code Store LLC and the holders of said trademarks.