Creating a New Component
This topic describes how to create and setup a component.
To create a component, follow these steps:
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.
- Create a unit for the new component.
- Derive your component from an existing component type.
- Add properties, methods, and events.
- Register your component with the IDE.
- Create a bitmap for the component.
- Create a package (a special dynamic-link library) so that you can install your component in the IDE.
- 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.