/ Forums / Advansys Formativ / Creating Solutions with Formativ / Running Activex components within Formativ / Reply To: Running Activex components within Formativ

#7128
Support 1a
Participant

Dear Mike,

Thank you for your question above. The answer depends upon the implementation of the ActiveX control.

Neither Formativ 1.6 or Formativ 2.0 will let you use custom visual ActiveX controls in a ‘drag and drop’ fashion. I.e. you can’t add third party controls to the pallete, then drop them onto a Formativ form.

Both versions of Formativ _will_ let you instantiate an instance of an ActiveX control using CreateObject(). You pass the ProgID of the ActiveX control to CreateObject. You can then call the methods of the ActiveX using the object returned from the call to CreateObject.

We use this technique to create and use instances of the Novell eDirectory NDS ActiveX controls in both Formativ 1.6 and 2.0.

You would have to ask the ActiveX vendor for details of the ProgID. Alternatively, if you know what you are looking for, you can usually locate in the ProgID in the Windows Registry.

If this approach doesn’t work (and it won’t work with all ActiveX controls – some require you to drop them into a form in order to work), the only other option would be to use something like Visual Basic, Delphi or C++ to create an Automation Server/COM object, and drop your Active X control onto a form hosted inside the server. You would then create an instance of the server from within Formativ (again using CreateObject) and call methods on the object via methods you expose in your Automation server. Of course, you would also need to distribute and register your automation server along with the applet.

I hope this helps. Please let me know if any of this description isn’t clear.

Regards,

Advansys Support