The ShapeApp samples are a great way to learn about Visual Studio 2005 Tools for Applications (VSTA). These samples provide the complete source code for several different integrations of VSTA with an application, called ShapeApp. Most of the walkthroughs and code examples in the VSTA documentation make extensive use the ShapeApp samples.
 
ShapeApp is a drawing application that provides a set of shapes that you can drag onto documents. You can modify the shapes on a document by moving them to another location, changing their size, or changing their color. ShapeApp includes an object model that defines the shapes and the actions that each shape supports. ShapeApp is a relatively simple application, yet the samples are complex enough to demonstrate how to solve many VSTA integration issues in real-world applications.
 
The VSTA SDK provides versions of the ShapeApp samples that are written using C++ and Visual C#. There are three versions of the sample for each language.
  • ShapeAppMFC and ShapeAppCSharp. These samples include the source code to just the ShapeApp application, without VSTA modifications.
  • ShapeAppBasicMFC and ShapeAppBasicCSharp. These samples demonstrate how to modify ShapeApp so that it uses VSTA to load application-level add-ins. These samples include project templates you can use to create application-level add-ins for ShapeApp, and a sample add-in that was written using the templates.
  • ShapeAppAdvancedMFC and ShapeAppAdvancedCSharp. These samples demonstrate how to modify ShapeApp so that it uses VSTA to load application-level and document-level add-ins. These samples also demonstrate how to use VSTA to record macros, debug add-ins in an external process, and implement other advanced customization features in ShapeApp. These samples include project templates you can use to create application-level and document-level add-ins for ShapeApp, and sample add-ins that were written using the templates.
To learn more about what these samples demonstrate and where to find them, refer to the "ShapeAppMFC Samples" and "ShapeAppCSharp Samples" topics in the VSTA SDK documentation. Before you build and run these samples, make sure that you read through the "How to: Build and Run the ShapeAppMFC Samples" and "How to: Build and Run the ShapeAppCSharp Samples" topics. These topics provide step-by-step instructions that will get you up and running with each version of the sample.
 
The following screenshot shows where these topics are located in the table of contents for the VSTA SDK documentation.
 
McLean Schofield
Programming Writer
 

The VSTA SDK is installed as part of the Visual Studio SDK.  Download VSTA from https://affiliate.vsipmembers.com/downloads/49/UserFileDownload.ashx and see how easy it is to enable application customizations in your solutions today.