Testing the Component
Once you have installed the dialog box component, you can use it as you would any of the common dialog boxes, by placing one on a form and executing it. A quick way to test the About box is to add a command button to a form and execute the dialog box when the user clicks the button.
For example, if you created an About dialog box, made it a component, and added it to the Tool palette, you can test it with the following steps:
- Create a new project.
- Place an About box component on the main form.
- Place a command button on the form.
- Double-click the command button to create an empty click-event handler.
- In the click-event handler, type the following line of code:
- Run the application.
When the main form appears, click the command button. The About box appears with the default project icon and the name Project1. Choose OK to close the dialog box.
You can further test the component by setting the various properties of the About box component and again running the application.