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.
Changing the default close behavior of the client
In the View Designer, open FormSalesOrders and click once on the form.
In the Properties window, set the MinimizeBox to False.
Add a using directive for both the Sybase.UnwiredAccelerator.Windows.Forms and the Sybase.UnwiredAccelerator.Data assemblies to the FormSalesOrders code.
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.
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.
See 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.
Add a handler function for the FormSalesOrders Closing event as shown in the sample implementation of this tutorial.
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.