Creating a New Component

From RAD Studio
Jump to: navigation, search

Go Up to Introduction to component creation Index

This topic describes how to create and setup a component.

To create a component, follow these steps:

  1. Creating a Unit File
  2. Deriving the Component
  3. Registering the Component

Now you will have a minimally functional component ready to install on the Tool Palette. After installing, you can add your new component to a form and test it at both design time and runtime. You can then add more features to the component, update the Tool Palette, and continue testing.

There are several basic steps that you perform whenever you create a new component. These steps are described below; other examples in this document assume that you know how to perform them.

  1. Create a unit for the new component.
  2. Derive your component from an existing component type.
  3. Add properties, methods, and events.
  4. Register your component with the IDE.
  5. Create a bitmap for the component.
  6. Create a package (a special dynamic-link library) so that you can install your component in the IDE.
  7. Create a Help file to instruct component users on how to use the component and its properties, methods, and events.

Note: Creating a Help file is optional.

When you finish, the complete component includes the following files:

  • A package (.BPL) file
  • A compiled package (.DCP) file
  • A compiled unit (.DCU) file
  • A palette bitmap (.DCR) file
  • Application icon
You can create a bitmap as an icon to represent your new component. Use the Project > Options > Application dialog box to specify your application icon.
  • A Help file
This is typically .CHM for HTML Help. You can use .HLP for WinHelp only if your platform supports WinHelp or if you have downloaded the WinHelp32.exe viewer from the Microsoft Download Center @ http://www.microsoft.com/downloads/en/default.aspx.

Topics

See Also