/ Forums / Advansys Formativ / Creating Solutions with Formativ / Running Activex components within Formativ

  • Creator
    Topic
  • #4109
    mikecopeman
    Participant

    I am using Formativ Admin – Version 1.6
    Build 1.6.0.12. I have an Activex component which is a form for choosing where to file emails and attachments based on information in our Document Management system (Singleview).

    A second component uses Singleview to communicate via web services.

    Is there a way of calling the form from within Formativ, and if so can the second component be instantiated within Formativ.

    i.e. Dim g_objServiceInterface As svFilingClient.lsServicesAdapter
    Set g_objServiceInterface = New svFilingClient.clsWebServicesAdapter
    g_objServiceInterface.Connect g_strServername

    g_strServername is a string which will have been set to the name of the Singleview web server.

    The files used are svProfileControl.ocx and svFilingClient.dll.

    At the moment I can only seem to work with a limited range of components which are written for Formativ development only.

    I am relatively new to Formativ application development so some help would be greatly appreciated.

    If it is not possible would it be with version 2?

    Thanks

    Mike

  • Author
    Replies
  • #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

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.