SetScreenOrientation

Description

Sets the screen orientation of a device or emulator capable of screen rotation.

Syntax

Integer SetScreenOrientation ( iOrientation )

Argument

Description

iOrientation

A value corresponding to the screen orientation that you want to set. Values are:

  • 0 0 degrees (the native orientation for the device)

  • 1 90 degrees (right-handed landscape orientation)

  • 2 180 degrees (upside down)

  • 4 270 degrees (left-handed landscape orientation)

Returns

Returns 0 for success or a negative number for failure.

Usage

This function is supported on the Windows Mobile 2003 Second Edition platform. However, not all devices using this platform support screen rotation.

Examples

Example 1

The following lines rotate the current screen to a right-handed landscape orientation:

integer iRotate, iRet

iRotate = 1

iRet = SetScreenOrientation( iRotate )

See also