How to integrate an activeX control in zenOn and update values in the activeX control
Step 1: Be aware that your activeX control is already registered (regsvr32 )
Step 2: insert the activeX control into the zenOn picture (Insert dynamic element -> activeX element) in the following dialog the activeX control should be selected.
Step 4: make in the thisporject (in the VBA editor) the public declarations and the init event of the control:
VBA Code:
Public WithEvents obSlider As CD_SliderCtrl
Public Sub Init_Slider(obElem As Element)
Set obSlider = obElem.ActiveX
'ActiveX exists
If obSlider Is Nothing Then Exit Sub
'insert the init value
End Sub
Step 5: If you have an event action in the activeX control, you can add it in the code and alter the values of the element (e.g CDSlider_Draw)
Step 6: Create in the zenOn Tree -> Scripting - VBA Macros -> Module Element -> Init a new function which you link in the zenOn picture at the activeX control in the init Event. This function should consist the following code: VBA Code:
Public Sub Init_Control(obElem As Element)
thisProject.Init_Slider obElem
End Sub
The control should be now be integrated in the zenOn picture
This is a migrated post! Originally posted on 28.08.2007 by user sebastiank. Please be aware that information can be outdated.