Making a Dialog Box a Component - Overview
Go Up to Making a dialog box a component Index
You will find it convenient to make a frequently used dialog box into a component that you add to the Tool palette. Your dialog box components will work just like the components that represent the standard common dialog boxes. The goal is to create a simple component that a user can add to a project and set properties for at design time.
Making a dialog box a component requires these steps:
- Defining the Component Interface
- Creating and Registering the Component
- Creating the Component Interface
- Testing the Component
The Delphi "wrapper" component associated with the dialog box creates and executes the dialog box at run time, passing along the data the user specified. The dialog-box component is therefore both reusable and customizable.
In this section, you will see how to create a wrapper component around the generic About Box form provided in the Delphi Object Repository.
Note: Copy the files ABOUT.PAS and ABOUT.DFM into your working directory.
There are not many special considerations for designing a dialog box that will be wrapped into a component. Nearly any form can operate as a dialog box in this context.