RAD Studio (Common)
Active Form or ActiveX Control wizard

FileNewOther<personality>ActiveXActive Form 

FileNewOther<personality>ActiveXActiveX Control 

Use the Active Form wizard to add an Active Form to an ActiveX Library project. The wizard creates an ActiveX Library project (if needed), a type library, a form, an implementation unit, and a unit containing corresponding type library declarations.  

Use the ActiveX Control wizard to create an ActiveX control from a VCL control that you specify. The properties, methods, and events of the VCL control become the properties, methods, and events of the ActiveX control that the wizard creates.

Note: These two items (Active Form and ActiveX Control) do not appear in the New Items list until after you create an ActiveX Library (this icon does initially appear in the New Items list). For instructions, see Using the COM Wizards.

CoClass Name  
Specify the name for the control that you want to implement. This is the CoClass name that appears in the type library. The generated implementation class has the same name with a ‘T’ prepended.  
Provide an optional description of the component you are creating.  
Threading Model  
Choose the threading model to indicate how COM serializes calls to the interface of your Active form or ActiveX control. The threading model you choose determines how the control is registered. You must make sure that your implementation adheres to the model selected.
The wizard always specifies Apartment as the threading model. This is not a problem if your ActiveX project contains only a single control. However, if you add additional controls to your project, you are responsible for providing thread support.  
Component Name  
Use the dropdown list to select the VCL component that you want to use as the ancestor of the ActiveX control you are creating. For an Active Form, the component is always TActiveForm.  
Indicates the name of the default interface for the control. By default, the control’s interface is the same as the CoClass name, with an ‘I’ prepended.  
Include version information  
You can include version information, such as a copyright or a file description, in the control. This information can be viewed in a browser. Some host clients, such as Visual Basic 4.0, require Version information or they will not host the control. You can specify version information by choosing ProjectOptions and selecting the Version Info page.  
Include about box  
You can tell the wizard to generate a separate form that implements an About box for your control. Users of the host application can display this box in a development environment. By default, the About box includes the name of the ActiveX control, an image, copyright information, and an OK button. You can modify this default form, which the wizard adds to your project.  

ActiveX controls can use the following threading models:

Only one client thread can be serviced at a time. COM serializes all incoming calls to enforce this. Your code needs no thread support.  
Each control instantiated by a client is accessed by one thread at a time. You must protect against multiple threads accessing global memory, but objects can safely access their own instance data (object properties and members).  
Each control instance may be called by multiple threads simultaneously. You must protect instance data as well as global memory.  
This is the same as the Free-threaded model, except that all callbacks supplied by clients are guaranteed to execute in the same thread. This means you do not need protect values supplied as parameters to callback functions.  
Multiple clients can call the control on different threads at the same time, but COM ensures that no two calls conflict. You must guard against thread conflicts involving global data and any instance data that is accessed by more than one method. This model should not be used with objects that have a user interface. This model is only available under COM+. Under COM, it is mapped to the Apartment model.  
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!