When you install ComponentOne Studio for iPhone, the Create a ComponentOne Visual Studio Toolbox Tab checkbox is checked, by default, in the installation wizard. When you open Visual Studio, you will notice a ComponentOne iPhone tab containing the ComponentOne controls has automatically been added to the Toolbox.
If you decide to uncheck the Create a ComponentOne Visual Studio Toolbox Tab checkbox during installation, you can manually add ComponentOne controls to the Toolbox at a later time.
Manually Adding Components to the Toolbox
To add ComponentOne controls to the Visual Studio Toolbox:
1. Open the Visual Studio IDE (Microsoft Development Environment). Make sure the Toolbox is visible (select Toolbox in the View menu, if necessary) and right-click it to open the Toolbox context menu.
2. To make a component appear on its own tab in the Toolbox, select Add Tab from the context menu and type in the tab name, C1WebGrid, for example.
3. Right-click the tab where the component is to appear and select Choose Items from the context menu.
4. The Choose Toolbox Items dialog box opens.
5. Select the .NET Framework Components tab.
6. Sort the list by Namespace (click the Namespace column header) and check the check box for the component belonging to the desired namespace. Note that there may be more than one component for each namespace.
Adding Components to a Form
To add one of the components to a form:
1. Add it to the Visual Studio Toolbox.
2. Double-click the control or drag it onto your form.
Adding a Reference to a ComponentOne Assembly
A reference to an assembly is added to your project when a control is added to the form, but you can manually add a reference to a ComponentOne assembly, if necessary.
To add a reference to an assembly in your project:
1. Click View | Solution Explorer and select the Web site URL (Web site project) or the Show All Files button (Web application project) in the Solution Explorer.
2. Right-click the Bin (Web site project) folder or References (Web application project) folder and select Add Reference. The Add Reference dialog box opens.
3. Select the .NET tab and choose the desired assembly from the list or select the Browse tab to locate and select the .dll file.
4. Click OK to close the Add Reference dialog box. A reference is added to your project.
5. Double-click the form caption area to open the code window. At the top of the file, add an Imports statement (using in C#) similar to the following:
Imports C1.Web.iPhone.C1LaunchPad
Note: This makes the objects defined in the ComponentOne assembly visible to the project. See Namespaces for more information.