Cicode Programming Reference > Cicode Function Categories > Display Functions Introduction > DspAnCreateControlObject


Creates a new instance of an ActiveX object. If the object already exists for the given Animation Point Number, then that object will be used, that is a new object will not be created, the existing object will merely be refreshed.

AN object created using this function remains in existence until the page is closed or the associated Cicode Object is deleted.


DspAnCreateControlObject(AN, sClass, Width, Height [, sEventClass] )


The animation-point number.


The class of the object. You can use the object's human readable name, its program ID, or its GUID. If the class does not exist, the function will return an error.

For example:


The width of the ActiveX object.


The height of the ActiveX object.


The string you would like to use as the event class for the object.

Return Value

The newly created object, if successful, otherwise an error is generated.

Related Functions

CreateObject, CreateControlObject


See CreateControlObject

See Also

Display Functions