This topic describes explains how to set up test projects to exercise most of the objects in-process components can provide. ActiveX documents, however, cannot be tested as described here. See "Building ActiveX Documents."
To create a test project for an in-process component
The caption of the Project window changes to Project Group, with a default name, to indicate that multiple projects are loaded.
As described in "How to Test ActiveX Components," use an ActiveX Exe project as your test project if your component implements call-backs.
Note When setting up a test program for ActiveX control projects, don’t set a reference. A control project automatically adds itself to the Components dialog box the first time you place a control on a test project form. For additional information, see "Debugging Controls" in "Building ActiveX Controls."
If your component still does not appear in the References dialog box of your test project, make sure at least one class module in the component has its Instancing property set to a value other than Private and PublicNotCreatable.
Note Because ActiveX control projects cannot be startup projects, a test project added to an ActiveX control project will automatically assume the startup role. If the test project entry in the Project window is in bold-face type, the test project is already the startup project.
With the test project selected in the Project window, you can use the Object Browser to verify that the public classes, methods, and properties of your component are available. You can also use the Object Browser to examine and add description strings, and to verify that Help topics are correctly linked.
The view you get in the Object Browser differs depending on which project is currently active — that is, which one is selected in the Project window. When your component project is active, the Object Browser will show both public members and Friend functions. When the test project is active, only the public members are visible.
For More Information Friend functions are discussed in "Private Communications Between Your Objects" in "General Principles of Component Design." Special considerations for debugging ActiveX control projects, including running code at design time, are covered in "Debugging Controls" in "Building ActiveX Controls." ActiveX Documents cannot be debugged without a browser or other active document container. See "Building ActiveX Documents."