Progress
External Program
Interfaces
Example Automation Applications
Progress comes installed with a number of sample Automation applications that you can use to test and borrow code for your own application development. These reside in separate subdirectories under
%DLC%\src\samples\ActiveX
. Each subdirectory contains a set of files for one application. These files include areadme.txt
file that describes the requirements for running the application and the capabilities that it demonstrates.For example, the
ExcelGraphs
subdirectory providesoleauto.p
. This application creates an Excel bar chart that graphs sales data from the sports database.The following procedure listing shows
oleauto.p
. The bolded code shows the five component handles and where they are used to instantiate and release Automation objects. Only the Excel Application object is instantiated with the CREATE Automation Object statement. The rest are instantiated from methods of the Application object and its subordinate objects.As the comments indicate, this procedure starts Excel, generates the graph from the sports database, and exits leaving Excel and the graph open on your Windows desktop. Thus, this application really functions as a startup file for Excel and releases all of its instantiated Automation objects just prior to terminating. The objects that Excel requires remain instantiated:
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |