Share via


Task 1: Create the Simple Order Form Windows Form Project

Download sample

In this task, you create the host application that is used in the tutorial. The application is a basic order form that uses Windows Forms for its user interface. It enables users to select an item from a list and add a quantity value.

After you perform this task, you will have an application that supports this functionality. Throughout the rest of the tutorial, you will add the remaining code that is required to invoke and communicate with the state machine workflow.

Note

Although you are encouraged to follow the exercises in a linear manner, it is not required. You can start this exercise by opening the sample project and proceeding to the steps shown in the following section.

To create the project

  1. In Visual Studio, click File, point to New, and click Project. If you want to create a C# project, select Visual C#, Windows, choose Windows Forms Application, and name the project StateMachineHost. Click OK. If you want to create a Visual Basic project, select Visual Basic, Windows and follow the previous steps.

  2. In Solution Explorer, right-click the Form1.cs file and click Rename. Name the new form MainForm.cs, and confirm that you would like to rename all references in the project.

Compiling the Code

For more information about compiling your code, see Compiling the Code.

In the next exercise, Exercise 2: Create the Simple Order Form Application, you define an interface that is used to enable communication between the state machine workflow and the Simple Order Form application.

See Also

Concepts

State Machine Workflows

Other Resources

Exercise 2: Create the Simple Order Form Application
Tutorial: Create a State Machine Workflow
Ordering State Machine
Simple State Machine

Copyright © 2007 by Microsoft Corporation. All rights reserved.
Last Published: 2010-03-04