Skip to Content

What are the options for using ActiveX controls?

Estimated Reading Time: 1 Minutes

Question:

What are my options if my application depends on ActiveX controls and I want to continue to use those controls when running on Windows?

Answer:

isCOBOL supports Javabean controls in the GUI, and there are a number of solutions for accessing COM/OLE/ActiveX from within a Java-based application.

We have tested and verified the functionality of comfyj which generates java classes to wrap ActiveX objects.
We recommend the Comfyj product because it is more complete and better supported from a technical point of view.
In addition, they charge just for development and not for runtime.

Veryant can provide a side-by-side example of a program that uses a Microsoft COM object with ACUCOBOL syntax and the same program written with isCOBOL and Comfyj.

An ActiveX control in the screen section, when converted to a Javabean, looks similar to the following:

   screen section.
   01 mask .
      03 GR-TEST JAVA-BEAN
          LINE 2
          COL 2
          LINES 28
          SIZE 90
          ID GR-ID-TEST
          VISIBLE 1
          ENABLED 1
          CLSID "VSFlexGridContainer"
          EVENT-LIST ("vsflexgrid")
          OBJECT IN FLEXGRID-TEST
          EVENT JAVA-BEAN-EVENT

   java-bean-event.
      if event-type = msg-jb-event
         set flex-event-obj to event-obj as activex-event
         evaluate event-data-2
         when 100
             display "FSCommand event: command = "
         end-evaluate
      else
         set flex-event-obj to event-obj as activex-event
      end-if.

What are the options for using ActiveX controls?