Leveraging Ready-made Controls

You can use many different ActiveX® controls and COM objects in your ACUCOBOL-GT® program. When you add an ActiveX control or COM object to your program, whether it is graphical or non-graphical, the control or object becomes part of the development and run-time environment and instantly provides the application with new functionality.

COM objects are application components that perform well-defined functions, often involving a graphical user interface. ActiveX controls are COM objects that subscribe to the ActiveX component model originally developed by Microsoft. As such, they behave in a manner that developers can predict, they are reusable, and they are toolable. Pre-programmed controls (such as calendars, clocks, and gauges) are sold by third-party vendors along with the licensing rights to use them in your Windows application. Non-graphical controls and objects such as spell checkers and COM servers are also available, widening the opportunities for your COBOL application even further.

By supporting ActiveX controls and COM objects, ACUCOBOL-GT allows you to take advantage of existing software functionality, as well as create applications that conform to the Windows standard.

This chapter provides a general overview of ActiveX and COM programming, including information on how to add ActiveX and COM objects to your program, avoid name clashes, distribute a program that contains an ActiveX or COM object, respond to events, handle errors, and more. Reference material is also provided in the ACUCOBOL-GT documentation set:

Note: Please note that ACUCOBOL-GT does not support windowless ActiveX controls. If you want to use a windowless control, see if it is available as a .NET assembly, then use our .NET interface to invoke the control. See Using .NET Assemblies in COBOL for details.