Share via


Pocket PC Form Style 

Pocket PC applications run indefinitely to allow users to navigate between them quickly. The smart minimize feature allows an application to remain running but not visible, but easily reactivated and at the location in the application where the user left off.

Form Style Properties

The following table describes how to set form properties to allow the user to close an application, use smart minimize, and access other Pocket PC features.

To Display Visual Basic Visual C#

OK button on upper-right corner.

This closes the application.

Me.MinimizeBox = False

this.MinimizeBox = false;

X button on upper-right corner. (both statements required)

This minimizes the application and is the default setting.

Me.ControlBox = True Me.MinimizeBox = True

this.ControlBox = true; this.MinimizeBox = true;

No X or OK button on upper-right corner.

Note   In non-Pocket PC applications running Windows CE, the Minimize and Maximize buttons remain when ControlBox = false.

Me.ControlBox = False

this.ControlBox = false;

Full sized form

Me.WindowState = FormWindowState.Maximized Me.FormBorderStyle = FormBorderStyle.None Me.ControlBox = False Me.Menu = Nothing

this.WindowState = FormWindowState.Maximized; this.FormBorderStyle = FormBorderStyle.None; this.ControlBox = false; this.Menu = null;

Bottom menu bar and soft input panel (SIP) icon

Me.Menu = New MainMenu()

this.Menu = new MainMenu();

Form that can be resized.

Forms with borders are full sized and cannot be resized.

Me.BorderStyle = BorderStyle.None

this.BorderStyle = BorderStyle.None;

No bottom menu bar and SIP icon

Me.Menu = Nothing

this.Menu = null;

A form has the following default values:

  • Form.WindowState = Normal

  • Form.ControlBox = True

  • Form.MinimizeBox = True

The SIP icon is always visible when the bottom menu bar is displayed.