Creating the FormSalesOrders form

The default X button that appears in the upper-right corner of the Pocket PC applications is a minimize button rather than an exit button. In the procedure below, you will first change the default behavior of the client, then set the FormSalesOrders screen to display an OK button, which will terminate the client application when clicked.

StepsChanging the default close behavior of the client

  1. In the View Designer, open FormSalesOrders and click once on the form.

  2. In the Properties window, set the MinimizeBox to False.

  3. Add a using directive for both the Sybase.UnwiredAccelerator.Windows.Forms and the Sybase.UnwiredAccelerator.Data assemblies to the FormSalesOrders code.

  4. Place an Input Panel control on FormSalesOrders and name the object sip (Soft Input Panel, another name for on-screen keyboards) and implement an empty handler function for the EnabledChanged event.

  5. Edit FormSalesOrders so it implements the Sybase.UnwiredAccelerator.Windows.Forms.IStackFormsManagerForm interface.

    See the sample implementation of this tutorial for the implementation of the IStackFormsManagerForm interface.

    NoteSee the Unwired Accelerator .NET API Cookbook and API documentation for more information on the IStackFormsManagerForm interface and its use. Every form in this custom client application implements the IStackFormsManagerForm interface.

  6. Add a handler function for the FormSalesOrders Closing event as shown in the sample implementation of this tutorial.

  7. Now place a label, a data grid and a combo box on the FormSalesOrders form. Refer to the sample implementation of this tutorial for more detailed information on the placement and settings of these controls.

    The combo box will be used to show the list of customer names. When a name is selected the sales orders for that customer will be populated into the data grid. The label is used to show a Customers: title above the combo box.