How to: Change the Orientation and Resolution of Forms (Devices)

Default orientation (rotation) properties are already set for platforms installed with Visual Studio. Use the following steps if you need to change the properties or if you have installed an SDK in which these properties are incorrect or lacking.

To change orientation

  1. On the Tools menu, click Options, click Device Tools, and then click Form Factors.

  2. Select the form factor — for example, Pocket PC 2003 Portrait — for the form in your project, and then click Properties.

  3. Select Show skin in Windows Forms Designer and Enable rotation support.

  4. Click OK to close the Form Factor Properties dialog box, and click OK again to close the Options dialog box.

    Note

    If the designer was open when you changed options, close and re-open it for the changes to take effect.

  5. In the designer, right-click the form or the skin, and then select Rotate Left or Rotate Right to rotate the skin.

    Whether the form rotates when the device rotates depends on the current platform and on form property settings, as follows:

    • Smartphone: The form always rotates when the device rotates.

    • Pocket PC: The form rotates by default when the device rotates. To prevent the form from rotating with the device, set the WindowState property of the form to Normal and the FormBorderStyle property to None.

    • Windows CE: The form does not rotate by default when the device rotates. To make the form rotate with the device, set the WindowState property to Maximized.

To change resolution

  1. On the Tools menu, click Options, click Device Tools, and then click Form Factors.

  2. Select the form factor — for example, Pocket PC 2003 Portrait — for the form in your project, and then click Properties.

  3. In the Form Factor Properties dialog box, set the vertical and horizontal resolution.

  4. Click OK to close the Form Factor Properties dialog box, and then click OK again to close the Options dialog box.

    Note

    If the designer was open when you changed options, close and re-open it for the changes to take effect.

See Also

Reference

Form Factor Properties Dialog Box (Devices)

Form Factors, Device Tools, Options Dialog Box