Step 1: Create a Component
In this step, you use Component Designer to create a component for a Hello World application.
Create a new directory to store your component resources. For example, create C:\HelloWorld_Component.
From the Windows XP Embedded CD-ROM, Disk 1, copy the HelloWorld.exe file from the Samples\Tutorial directory to the HelloWorld_Component directory.
The HelloWorld.exe application requires the msvbvm60.dll library to run. This file is located in the C:\Windows\System32 directory on Windows XP Professional systems. Copy this file to the HelloWorld_Component directory.
Run Component Designer.
From the File menu, choose New.
A new document opens.
Expand the Windows XP Embedded Client (x86) node.
In the SLD browser, right-click Components, and then choose Add Component.
The new component automatically expands in the SLD browser.
In the SLD browser, right-click Repositories, and then choose Add Repository.
In the Name box in the Repository Properties dialog box, replace the default repository name with HelloRepository.
In the Source Path dialog box, browse to C:\HelloWorld_Component and then choose OK.
In the SLD browser, choose New Component. In the Name dialog box, replace the default name with Hello World.
Choose the Repositories button on the right side of the Repository box.
In the Select Repository dialog box, select HelloRepository, and then choose OK.
You have now created a component and associated it with a repository, which is the container for the files used in this tutorial.
In the SLD browser, right-click Files, and then choose Add, and then Files in Folder.
In the Browse For Folder dialog box, locate and choose the HelloWorld_Component folder, and then choose OK. When prompted if you want to continue, choose Yes.
The Adding Resources dialog box appears.
When the Adding Resources dialog box displays the text "All resources were added successfully", choose Close.
To save the .sld file for your component, choose the File menu, and then choose Save. Save the file as HelloWorld in the Tutorial folder.
You have now finished creating your component definition associated with a repository, and saved the information in an .sld file.
From the File menu, choose Exit.
You are now ready to import the component into the component database.
See Also
Step 2: Import the Component to the Database | Tutorial: Creating a Custom Component
Last updated on Wednesday, October 18, 2006
© 2006 Microsoft Corporation. All rights reserved.