You can add user forms to your TestComplete project only if it contains the User Forms project item. If your project does not contain this item, you should add it to the project first.
Right-click the UserForms project item in the Project Explorer panel and choose Add | New Item from the context menu.
-- or --
Select the UserForms project item and press the Add Child Item button on the Project Explorer toolbar.
-- or --
Select the UserForms project item and select File > New > New Item from the TestComplete main menu.
In the subsequent Create Project Item dialog, enter the form name and click OK.
|Note:||Since the form name is used to refer the form in scripts and keyword tests, it must be a valid identifier.|
After you have created the form, TestComplete displays it in the User Forms editor. You can then place components onto the form, configure their properties and create event handlers for them.
Right-click the UserForms project item in the Project Explorer panel and select Add > Existing Item from the context menu.
-- or --
Select the UserForms project item and press the Add Existing Item button on the Project Explorer toolbar.
In the subsequent Open File dialog, select the file that holds the form you need.
After the form has been added to the project, TestComplete opens this form in the User Forms editor, so you can view and modify it.
|Do not share user forms among projects. Event handlers you specify for user form components use project-specific identifiers to "bind" keyword tests or script routines to component events. They will not be valid for another project.
As a workaround, you can use a script extension with a user form.
To learn more about how to share the project items in TestComplete, see the corresponding section.