property Control.ControlID as String
Specifies the control's identifier.

 TypeDescription 
   String A string expression that indicates the control's identifier.  

The ControlID and LicenseKey properties must be set before calling Create method. The Create method creates an ActiveX control given its identifier and its runtime license key, if required. A control identifier, or programmatic identifier, is a registry entry that can be associated with a CLSID. The format of a control identifier is <Vendor>.<Component>.<Version>, separated by periods and with no spaces, as in Word.Document.6. 

For instance, the control's identifier for Microsoft Calendar Control is "MSCAL.Calendar", the control's identifier for Exontrol ExGrid Control is "Exontrol.Grid", and so on. 

The following VB sample displays the Microsoft Chart Control to a popup menu:

Private Sub ExMenu1_OleEvent(ByVal ID As Long, ByVal Ev As EXMENULibCtl.IOleEvent)
    Debug.Print Ev.Name
End Sub

Private Sub Form_Load()
    With ExMenu1
        With .Items.Add("Chart", ItemTypeEnum.SubControl, 0).SubControl
            .ControlID = "MSChart20Lib.MSChart"
            .Create
        End With
        .Refresh
    End With
End Sub

The following VB sample displays a HTML document inside a SubControl item:

With ExMenu1
    With .Items.Add(" <b>HTML</b> Document ", EXMENULibCtl.SubControl, 1).SubControl
        .CloseOn = exClick
        .Width = 196
        .Height = 134
        .ControlID = "htmlfile"
        .Create
        With .Object()
            .write "<HTML><BODY>"
            .write "<p>This is a <b>HTML</b> page...</p>"
            .write "<ul>"
                .write "<li>1 issue</li>"
                .write "<li>2 issue</li>"
                .write "<li>3 issue</li>"
            .write "</ul>"
            .write "</BODY></HTML>"
        End With
    End With
    .Refresh
End With

The following VB sample adds the Exontrol.ChartView component:

The following C++ sample adds the Exontrol.ChartView component:

The C++ sample requires calling the #import <exorgchart.dll> to import definitions for the Exontrol.ChartView component. It generates the EXORGCHARTLib namespace where you can find all objects of the ExOrgChart component.

The following VB.NET sample adds the Exontrol.ChartView component:

The following C# sample adds the Exontrol.ChartView component:

The C# sample requires a new reference to the Exontrol's ExOrgChart component. Select the Project\Add Reference... and Select COM\ExOrgChart 1.0 Control Library. Once that the component is referred, the EXORGCHARTLib namespace is created, where we can find all objects and definitions for the component being inserted.

The ToUInt32 function converts a Color expression to OLE_COLOR:

private UInt32 ToUInt32(Color c)
{
	long i;
	i = c.R;
	i = i + 256 * c.G;
	i = i + 256 * 256 * c.B;
	return Convert.ToUInt32(i);
}

The following VFP sample adds the Exontrol.ChartView component:

 

 


Send comments on this topic.
1999-2015 Exontrol.COM, Software. All rights reserved.