Difference between revisions of "LazActiveX"

From Lazarus wiki
Jump to navigationJump to search
Line 1: Line 1:
 +
== Overview ==
  
 +
The LazActiveX package contains the TActiveXContainer component and the IDE integration of the necessary tools to create ActiveX components from a type library or directly from the object (exe or dll). ActiveX is a Microsoft Windows technology and can only be used on that platform. Cross compilation to windows is possible but the typelib importer used to create the COM bindings works only on Windows (wine not tested).
  
== Overview ==
+
== Installing ==
  
== Installing ==
+
LazActiveX needs FPC >= 2.6.1. 
  
 
== Usage ==
 
== Usage ==
  
=== TActiveXContainer ===
+
There are 3 ways of using ActiveX components:
 +
 
 +
- drop the TActiveXContainer on a form and assign the ActiveX ClassName to the OleClassName property. Suitable for late binding and without direct event support.
 +
 
 +
- import the ActiveX type library, drop the TActiveXContainer on a form, instantiate the ActiveX object and assign it to the ComServer property. Suitable for early binding and with event support.
 +
 
 +
- create a new component from the type library or the object and drop that new component on the form. This also uses early binding and has full event support. Event handlers can be assigned from the IDE.
 +
 
 +
=== TActiveXContainer late binding===
 +
 
 +
=== TActiveXContainer early binding===
  
=== Creating visual ActiveX components from type libraries ===
+
=== Creating visual ActiveX components from type libraries or objects ===

Revision as of 13:20, 11 April 2012

Overview

The LazActiveX package contains the TActiveXContainer component and the IDE integration of the necessary tools to create ActiveX components from a type library or directly from the object (exe or dll). ActiveX is a Microsoft Windows technology and can only be used on that platform. Cross compilation to windows is possible but the typelib importer used to create the COM bindings works only on Windows (wine not tested).

Installing

LazActiveX needs FPC >= 2.6.1.

Usage

There are 3 ways of using ActiveX components:

- drop the TActiveXContainer on a form and assign the ActiveX ClassName to the OleClassName property. Suitable for late binding and without direct event support.

- import the ActiveX type library, drop the TActiveXContainer on a form, instantiate the ActiveX object and assign it to the ComServer property. Suitable for early binding and with event support.

- create a new component from the type library or the object and drop that new component on the form. This also uses early binding and has full event support. Event handlers can be assigned from the IDE.

TActiveXContainer late binding

TActiveXContainer early binding

Creating visual ActiveX components from type libraries or objects