VARCHART XGantt - Frequently Asked Questions on Our Gantt Software
1. What can be Done if Printing Problems Occur in my Gantt Chart?
If in our Gantt software VARCHART ActiveX printing is impossible or if you cannot set up the printer, please verify whether the file vcprct32.dll exists. Also, please verify whether the file can be located by the PATH settings, and whether the Windows default printer was set up.
If the file vcprct32.dll does not exist, please contact the support of NETRONIC Software GmbH.
2. How to Make VARCHART XGantt Use a Modified INI file
Some of the settings in our ActiveX Gantt software cannot be modified on the property pages. Still, you can adjust them by the INI file:
- Open the General property page. The Configuration file field shows the current configuration file (for example project.ini).
- Please click on the Browse button. The Load/Save dialog will open. Please enter a file name into the Temporary data file field to be used as a temporary dummy configuration file, such as dummy.ini. Click on Save.
- Now click on the OK or Apply button of the General property page. The configuration file dummy.ini will automatically be generated and applied.
- You can now modify your INI file which in our example is the project.ini, by some text file editor and save your changements.
- On the General property page, select the modified file in the Configuration file field (project.ini) and click on OK. Your modified INI file is being effective from now on.
3. How can Context Menus in a Gantt Chart be Disabled?
You can prevent a predefined context menu from popping up in a Gantt chart by setting the returnStatus to vcRetStatNoPopup in our Gantt software. The below programming samples apply to the ActiveX edition and VB6:
//switching off the context menu of the diagram
Private Sub VcGantt1_OnDiagramRClick (ByVal x As Long, ByVal y As Long, returnStatus As Variant)
returnStatus = vcRetStatNoPopup
End Sub
//switching off the context menu of links
Private Sub VcGantt1_OnLinkRClickCltn (ByVal linkCltn As VcGanttLib.VcLinkCollection, ByVal x As Long, ByVal y As Long, returnStatus As Variant)
returnStatus = vcRetStatNoPopup
End Sub
//switching off the context menu of nodes
Private Sub VcGantt1_OnNodeRClick (ByVal node As VcGanttLib.VcNode, ByVal location As VcGanttLib.LocationEnum, ByVal x As Long, ByVal y As Long, returnStatus As Variant)
returnStatus = vcRetStatNoPopup
End Sub
4. What Prevents Nodes in a Gantt Chart from Being Generated Interactively?
Nodes in a Gantt chart can only be created interactively by our Gantt software if:
- ... on the General property page the check box Allow creation of nodes and links was activated
- ... in the programing code the property AllowNewNodesAndLinks was not set to False
- ... the return status of the event OnNodeCreate was not set to vcRetStatFalse.
Sub Form_Load
VcGantt1.AllowNewNodesAndLinks = False
End Sub
5. How can VARCHART XGantt be Licensed?
If you wish to continue an expired license of our Gantt software or to register a component for the first time, please open the Licensing dialog box on the General property page and click on the Request button.
Then the Request License Information dialog will open. Please enter your registration number, your name and the name of your company and click on Send email to NETRONIC. An email to NETRONIC will be generated automatically. As soon as we have received it, we will generate your license code and return it to you.
Please copy the license code to the text field of the licensing dialog and click on the button Activate License. Please leave the property pages of VARCHART XGantt by OK. Re-open some property page, make some change and store it. The new license will then be activated.
6. How to Integrate a License File into an ASP.NET Website Project of Visual Studio 2005
In a website project, Visual Studio 2005 stores the license information for our Gantt software VARCHART XGantt ASP.NET to the file app_licenses.dll. When building a project (Build > Rebuild all), the file is not updated. If you received a new license file, it is necessary to go through the steps described below to enforce the acceptance of the new license:
- Open the project in VS 2005
- In the project explorer, click on the file NETRONIC.XGantt.Web.dll, which you can find in the directory bin. In the field Auto-refresh path the property window indicates the folder from which the file NETRONIC.XGantt.Web.dll is updated automatically.
- Please close VS 2005.
- Please copy the license file NETRONIC.XGantt.Web.VcGantt.lic to the folder mentioned in step 2.
- Please open the project in VS 2005.
- Please rebuild the project by clicking on Build > Rebuild all. The license file is now copied to the bin folder of the project.
Please close VS 2005 and re-open the project in VS 2005. - In the project explorer, please click on the file licenses.licx by using the right mouse button and select build runtime licenses from the pop-up menu. The file app_licenses.dll will be rebuilt and the new license information will be copied from the file NETRONIC.XGantt.Web.VcGantt.lic to the DLL file.
- Please close VS 2005 and re-open the project in VS 2005.
- Re-build the project by Build > Rebuild all once again.
7. What if Problems Occur with Registering?
If during registration of our Gantt software VARCHART XGantt an error message occurs "REGSVR32 Error Return: 0X0000007e", the file vcprct32.dll does not exist or is not stored in a directory specified by the PATH.
If during registration an error message occurs "REGSVR32 Error Return: 0X000000b6" and "Number 6877 not found in dynamic link library MFC42.DLL", the file mfc42.dll does not exist or is not stored in a directory specified by the PATH.
If one of the files does not exist, please contact the support of NETRONIC Software GmbH.
8. How to Unhide Overlapping Activities in a Gantt Chart
To avoid bottlenecks in holiday rosters or machine allocations, overlapping activities in a group can be made visible.
Activities in Gantt charts can overlap if the activities were grouped and if on the Sorting property page the Nodes in one line option of our Gantt software was selected. With the Nodes in one line option, the activity groups can be collapsed and expanded. If a group was collapsed, overlapping activities cannot be detected in a Gantt chart. If a group is expanded, the activities are staggered so that overlapping activities become visible.
To make overlapping activities in a group visible, select the Nodes in one line option on the Sorting property page to display the activities of a group in one line. If the activities of a group overlap, they will be displayed in different lines of the Gantt chart even when the Nodes in One Line option is activated, allowing you to see collisions at a glance.
If the activities were collapsed, overlapping activities cannot be detected. Therefore you should deactivate the Modifications allowed option of our Gantt software to inhibit the user to switch between these two types of display. When the Initially collapsed option is not activated, the groups will be displayed in their expanded states, i.e. overlapping activities can be instantly recognised as they are displayed below one another in separate lines.
9. How to Indicate the Vertical Height of the Group by a Color
1) Create a filter in our Gantt software for each grouping level which selects for the title row of the group.
Filter conditions of grouping level 1:
<Group-/summary node >=1 AND <Grouping level>=1
Filter conditions of grouping level 2:
<Group-/summary node >=1 AND <Grouping level>=2
etc ...
2) Generate a table format (group title row) in our Gantt software for each grouping level:
a) Please assign the filters of step 1 to the corresponding levels
b) For each level above, add a preceding "empty box": create a column and do not assign it a data field or constant text. Column 1 receives the color of grouping level 1, column 2 receives the color of grouping level 2, etc.
c) Behind the empty boxes put a cell named by the pre-defined <Group title>
d) Assign the color of the current level
3) Do analogous settings to the "Standardlist" table format of the base rows:
a) For each level above, add a preceding "empty box" that has the color of the corresponding level
b) Define all other cells required behind the empty boxes
c) Assign own base row colors to these cells
4) Separators:
a) In the column titles, only switch ON the two outer separation lines.
b) In all other formats, switch OFF both separation lines.
10. How to Move a Bar Into a Gantt Graph by Clicking in the Table
The event OnNodeLClick in our Gantt software captures both, the node and the information InTable or InDiagram. If the table was clicked on (InTable), the relevant date of the node is retrieved and transferred to the VARCHART XGantt object using the ScrollToDate method.
Code Sample:
Private Sub VcGantt1_OnNodeLClick
(ByVal node As VcGanttLib.VcNode,
ByVal location As VcGanttLib.LocationEnum,
ByVal x As Long, ByVal y As Long,
returnStatus As Variant)
Dim myDataDef As VcDataDefinition
Dim myDataDefTable As VcDataDefinitionTable
Dim myDataField As VcDefinitionField
Dim myIndex As Integer
If location = vcInTable Then
// if the index of the field "Start" is unknown
Set myDataDef = VcGantt1.DataDefinition
Set myDataDefTable = myDataDef.DefinitionTable(vcMaindata)
Set myDataField = myDataDefTable.FieldByName("Start")
myIndex = myDataField.ID
VcGantt1.ScrollToDate node.DataField(myIndex), vcLeftAligned, 2
End If
End Sub
11. How to Delimit Time Scale Enlargement on Interactive Clicking
If you touch the time scale of a Gantt chart on the extreme left of the visible area while keeping the left mouse button depressed to zoom the timescale, you can easily reach a factor far in excess of 1000%. To control this, use the OnTimeScaleSectionRescale event of our Gantt software. The below code sample shows how to allow for a twofold enlargement at maximum.
Private Sub VcGantt1_OnTimeScaleSectionRescale
(ByVal timeScale As VcGanttLib.VcTimeScale,
ByVal sectionIndex As Integer,
ByVal newBasicUnitWidth As Long,
returnStatus As Variant)
Dim nOldUnitWidth As Long
nOldUnitWidth = timeScale.Section(sectionIndex).UnitWidth
If newBasicUnitWidth > (2 * nOldUnitWidth) Then
timeScale.UnitWidth = (2 * nOldUnitWidth)
returnStatus = False
End If
End Sub
12. How to use VARCHART XGantt in Windows SharePoint
Please provide a web application that implements the required Gantt functionality inside an ASP.NET web page. A web part element called PageViewer displays your application in Windows SharePoint. You merely need to communicate a link to your web page to the element. You can then use the PageViewer within Windows SharePoint like any other web part element. You can place your application on the SharePoint server or on any other web server.
13. Embedding XGantt.NET in WPF applications
The rich functionality of our Gantt software VARCHART XGantt is also available in WPF applications. For integrating Windows Forms controls into WPF-Windows Microsoft offers the WindowsFormsHost control that lets you use the .NET edition of XGantt within a WPF-Windows as well. Please find below the description of two alternative approaches:
Precondition: Adding the required references
In both cases, to use the WindowsFormsHost control, the references to WindowsFormsIntegration, System.Windows.Forms and of course NETRONIC.XGantt have to be created. Besides, the file licenses.licx has to be added, containing the following entry:
NETRONIC.XGantt.VcGantt, NETRONIC.XGantt,
Version=4.2.0.000, Culture=neutral,
PublicKeyToken=3658bc8cab00a1a5
Alternative 1: Integration by way of XAML code of the WPF Windows (Window1.xaml)
This approach integrates XGantt within the XAML code:
<Window x:Class="WpfApplication1.Window1"
This approach does not integrate our Gantt software VARCHART XGantt by way of using XAML code but by using code-behind in C#. For this reason, the XAML code does not contain any specific characteristics, it is just a standard description of a WPF Windows.
<Window x:Class="WpfApplication1.Window1"
Now the WindowsFormsHost object is created in code-behind and a VcGantt object is added to this object as child.
using System.Windows.Forms.Integration;using NETRONIC.XGantt;namespace WpfApplication1{
Using the property pages of our Gantt software for configuration
As, unfortunately, neither alternative offers the use of XGantt.NET's property pages, we recommend you to create a Windows form within the project so that this comfortable way of configuration is still available. You can then place another XGantt instance onto this form and carry out the desired settings on the property pages. This configuration can be exported as *.ini file and afterwards be reimported into the VcGantt object of the WPF Windows.
public Window1()
The NETRONIC components VARCHART XNet.NET and VARCHART XTree.NET can of course also be embedded in WPF applications in this way.
Helpful Links
- MSDN Library: "Walkthrough: Hosting a Windows Forms Control in Windows Presentation Foundation by Using XAML":
http://msdn.microsoft.com/en-us/library/ms742875.aspx - MSDN Library: "Walkthrough: Hosting a Windows Forms Control in Windows Presentation Foundation":
http://msdn.microsoft.com/en-us/library/ms751761.aspx
14. The VARCHART XGantt/XNet/XTree editions on X86 and X64 processor platforms
What versions of VARCHART XGantt/XNet/XTree can be used on X86 and X64 platforms? For a detailed answer, please download this PDF file (0.2 MB).
15. Error Message "An attempt was made to load a program with an incorrect format"
Applications written with the .NET framework usually are compiled into MSIL, a processor-independent byte code. When starting an application, MSIL is translated into a machine code that is understood by the processor of the computer and is executed at the processor's full speed. Applications in MSIL hence can be executed by all processors as long as they do not use pure machine code components (assemblies or DLLs). They can even be run on other operating systems, such as Mono with Linux if no operating system-dependent components are used. If an application is not independent of processors and operation systems, it should be marked accordingly to prevent it from being started by mistake on a processor not supported and from causing error messages on first-time use.
Internally, parts of VARCHART XGantt were written in pure machine code which in .NET is called Mixed Mode. Therefore, for each processor that VARCHART XGantt is to be used with, it has to be translated anew. There are variants available for x86 processors, and from version 4.3 onward also for x64 processors.
Applications that use VARCHART XGantt hence are not processor-independent. As this is not automatically recognized by the 2005 to 2010 versions of Visual Studio in, the processor has to be set manually to a project or a solution. This you can do by the configuration manager dialog which you can open by clicking on Build > Configuration Manager.
If the above menu item is not visible, please switch on the option Show advanced build configurations in the dialog Tools/Options.../Projects and Solutions/General.
To create a new platform please select <New...> in the field under Active solution platform in the configuration manager.
If you want to delete the platform Any CPU please select the <Edit...> item from the drop-down list in the platform column of the configuration manager before.
In the dialog on the left you can select the desired platform and delete it by clicking on Remove.
For the appropriate variant of VARCHART XGantt to be used with Visual Studio, the below procedures need to be added to the pre-build event and to the post-build event. Precedingly, a folder needs to be created that needs an access for writing from visual studio, for example c:\XGanttReference (otherwise please adapt the source code below):
This folder needs to contain the files NETRONIC.XGantt.dll, NETRONIC.XGanttd.dll (as an x86 variant) and NETRONIC.XGantt.VcGantt.lic. Beside, the NETRONIC.XGantt reference has to point to this folder in its projects.
Pre-build: The processor type required is copied from the installation folder to the reference folder.
set XGDIR=%ProgramFiles%\VARCHART\xgantt.net\
set XGREFDIR=c:\XGanttReference
if %PROCESSOR_ARCHITEW6432%- == AMD64- (if $(PlatformName) == x64 set XGDIR=%XGDIR%\x64)
copy "%XGDIR%\netronic.xgantt.dll" "%XGREFDIR%"
if exist "%XGDIR%\netronic.xganttc.dll" copy "%XGDIR%\netronic.xganttc.dll" "%XGREFDIR%"
if exist "%XGDIR%\netronic.xganttd.dll" copy "%XGDIR%\netronic.xganttd.dll" "%XGREFDIR%"
if exist "%XGREFDIR%\opsaps.dll" copy "%XGDIR%\opsaps.dll" "%XGREFDIR%"
if exist "%XGREFDIR%\opsaps64.dll" copy "%XGDIR%\opsaps64.dll" "%XGREFDIR%"
Post-build: The x86 type is copied from the installation folder to the reference folder, so the form editor of VS2010 subsequently will continue to work (lower section). In the top section the former procedure of exchange is shown, in case you are working on an x86 operation system.
set XGDIR=%ProgramFiles%\VARCHART\xgantt.net\
set XGREFDIR=c:\XGanttReference
rem if %PROCESSOR_ARCHITEW6432%- == AMD64- goto x64os
if $(PlatformName) == x64 copy "%XGDIR%\netronic.xgantt.dll"
"$(TargetDir)."
if $(PlatformName) == x64 (if exist "%XGDIR%\netronic.xganttc.dll" copy "%XGDIR%\netronic.xganttc.dll" "$(TargetDir).")
if $(PlatformName) == x64 (if exist "%XGDIR%\netronic.xganttd.dll" copy "%XGDIR%\netronic.xganttd.dll" "$(TargetDir).")
if $(PlatformName) == x64 (if exist "%XGDIR%\opsaps64.dll" copy "%XGDIR%\opsaps64.dll" "$(TargetDir).")
if $(PlatformName) == x64 (if exist "$(TargetDir)\opsaps.dll" del "$(TargetDir)\opsaps.dll")
exit
:x64os
copy "%XGDIR%\netronic.xgantt.dll" "%XGREFDIR%"
if exist "%XGDIR%\netronic.xganttc.dll" copy "%XGDIR%\netronic.xganttc.dll" "%XGREFDIR%"
if exist "%XGDIR%\netronic.xganttd.dll" copy "%XGDIR%\netronic.xganttd.dll" "%XGREFDIR%"
if exist "%XGREFDIR%\opsaps.dll" copy "%XGDIR%\opsaps.dll" "%XGREFDIR%"
if exist "%XGREFDIR%\opsaps64.dll" copy "%XGDIR%\opsaps64.dll" "%XGREFDIR%"
16. How to Use Values to Label a Curve
Especially when it comes to detailed planning, it may be convenient not only to represent resources by a histogram to allow a quick recognition of capacity bottlenecks but to display the exact values of a resource's utilization in addition. A vivid example of use would be production planning with the exact number of pieces of a machine being controlled.
Due to the high complexity of one or more histograms containing stacked curves with many values over time that in many cases result in a lack of space and thus prevent the label from being readable, curves can not be labelled in VARCHART XGantt.
If only few and seldom changing values are displayed in the application, thus leaving enough place for a label in X-direction, a curve label can be obtained by a second XGantt instance that is placed below the histogram.
In our sample the Gantt chart is created by VARCHART XGantt ActiveX, including the resource scheduling module. The capacity of a machine, measured by the number of pieces, is displayed together with the scheduled number of pieces (the first number always denoting the utilization, the second number the maximum availability of the resource):
Production planning displaying the utilization in the histogram
The highlighted order stipulates a production of 30 pieces. The histogram shows the resource scheduler's calculated distribution of 20 pieces at 8 o'clock and 10 pieces at 9 o'clock. The available capacity of 10 pieces at 9 o'clock can thus be easily recognized.
The horizontal scroll bars of the upper XGantt have to be disabled to make the two XGantt entities look like one diagram. Moreover, the settings of the zoom factor, the table width, the horizontal scroll offset and the unit width for the diagram have to be the same. This is achieved by the handling of several events such as OnTableWidth, OnTimeScaleSectionRescale, OnZoomFactorModifyComplete and On(Pre)ScrollDiagramHor. The sample ControlCenter that shows two XGantt entities which are arranged one below the other illustrates how the implementation is accomplished.
To position the numbers, a layer designed for containing the label, is created in the second XGantt at design time. This layer may be borderless and transparent so that the label doesn't look like a common layer. At runtime, a group and a node per label are created, the label being placed in that period of the curve that is to be labeled. When the group layout is switched to "All nodes in one row" and "Nodes optimized", the labels will all be drawn next to each other at the correct X-position!
Use the following code to create the label (VB98):









