Windows CE Platform Behavior 

It is important to be aware of platform-specific behavior when developing applications for Windows CE devices that are not Pocket PCs or Smartphones, especially when creating forms.

Windows CE has no specific screen size requirement, with many devices providing substantially large displays able to easily display multiple application forms. .NET Compact Framework applications can have forms of any size and position on the display. By default, these forms can be resized and repositioned in much the same way as forms created by the full .NET Framework running on the desktop.

Controls and Core Elements

The following table lists how controls and other elements operate and appear on Windows CE.

Note   You should explicitly set the Focus method as appropriate for controls and child forms.

Control or Element Behavior

Back color for container controls

The BackColor for a Form, Panel, and TabPage is the Control system color.

Control Box

If ControlBox = true, the form has a close (X) button.

Desktop

Screen without the taskbar.

ClientSize

The ClientSize of the form does not decrease when a menu bar is added to a form. Developers must accommodate any overlap possibilities after adding the menu bar.

Maximize Box

Windows CE forms include a maximize button.

Menu Bar and Toolbar

(These controls are combined and can display both menu items and toolbar buttons.)

Retains a fixed position at the top of the screen. The location cannot be changed because the form owns it. The bar occupies its portion of the client area.

Menu separator on the Main Menu

An exception is thrown when you attempt to add a menu separator to the Main Menu.

MessageBoxIcon enumeration

Supports the Asterisk, Exclamation, Hand, None, and Question enumerations.

Minimize Box

Windows CE forms include a minimize button.

SaveFileDialog

If you do not specify a file name extension, Windows CE does not append an extension but does return the ordinal position of the current filter.

Smart Minimize Button (X)

Not applicable. X buttons close the applications.

Taskbar

Bar at bottom with Start button and buttons for running programs.

FormBorderStyle

The following table lists behavior specific to the .NET Compact Framework for members of the FormBorderStyle enumeration.

FormBorderStyle Behavior

Fixed3D

Window has caption.

FixedDialog

Changes size programmatically, no caption.

FixedSingle

Window has caption, can change location and size programmatically.

FixedToolWindow

Same as FixedSingle.

None

No borders.

Sizable

Same as FixedSingle.

SizableToolWindow

Same as FixedSingle.

FormWindowState

The following table lists behavior specific to the .NET Compact Framework for members of the FormWindowState enumeration.

FormWindowState Behavior

Maximized

Window size is the size of desktop area

Normal

Window size is specified size. Default size is desktop area.

See Also

Other Resources

Application Development in the .NET Compact Framework