I'm trying to create a 2nd instance of an OCX control in a VB6 Active X EXE. The first instance of the OCX control is contained by and visible within a form in the ActiveX EXE. I'm trying to create the 2nd instance as a member of the ActiveX EXE class. This instance will not be contained by a form and will not be visible onscreen. I've been able to declare the instance but I can't find the proper syntax to initialize it with New operator.
Declaration inside ActiveX VB6 module
Private m_ZoomSigPlus2 As SIGPLUSLib.sigPlus
Initialization in ActiveX_Initialize() function
set m_ZoomSigPlus2 = New SIGPLUSLib.sigPlus
Compile error: Invalid use of New keyword
I've tried to look at how the instance that is part of the form is initialized but there doesn't seem to be an explicit New operation when the control is contained by a form. The declaration in the form is
Begin SIGPLUSLib.SigPlus SigPlus1
Height = 2415
Left = 0
TabIndex = 4
Top = 0
Width = 5055
End