method Control.Create ()
Creates the inside component.

 TypeDescription 

The Create method creates the ActiveX control. The Create method creates the control based on its control's identifier. Use the ControlID and LicenseKey properties to specify the control's identifier and the runtime license key for the control, if required ( please make sure that the runtime license key is not identical with your development license key ). If the Create method fails, the Object property gets nothing. Use the Object property to access the ActiveX control's properties and methods. Use the CloseOn property to specify how the item that hosts an ActiveX control is closed using the mouse. Use the Width and Height properties to specify the size of the item that hosts the ActiveX control. The control fires the OleEvent event when an inside ActiveX control fires an event. The look and feel of the inner ActiveX control depends on the identifier you are using, and the version of the library that implements the ActiveX control, so you need to consult the documentation of the inner ActiveX control you are inserting inside the eXMenu control.

The following VB sample creates a popup menu that hosts an Exontrol.Calendar component:

With ExMenu1
        With .Items.Add("Exontrol.<b>Calendar</b>", EXMENULibCtl.SubControl)
            .ID = 122
            With .SubControl
                .ControlID = "Exontrol.Calendar"
                .Create
                With .Object
                    .ShowWeeks = True
                    .ShowTodayButton = False
                End With
            End With
            
        End With
        .Refresh
    End With

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.