Export (0) Print
Expand All
Expand Minimize
0 out of 2 rated this helpful - Rate this topic

AutoScaleMode Enumeration

Specifies the different types of automatic scaling modes supported by Windows Forms.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)
public enum AutoScaleMode
Member nameDescription
Supported by the .NET Compact FrameworkNoneAutomatic scaling is disabled.
FontControls scale relative to the dimensions of the font the classes are using, which is typically the system font.
Supported by the .NET Compact FrameworkDpiControls scale relative to the display resolution. Common resolutions are 96 and 120 DPI.
Supported by the .NET Compact FrameworkInheritControls scale according to the classes' parent's scaling mode. If there is no parent, automatic scaling is disabled.

The ContainerControl class and classes derived from it, such as Form, can automatically resize themselves and their contents according to either the current system font or the resolution of the display, measured in dots per inch (DPI). The AutoScaleMode enumeration defines the automatic scaling modes supported by these classes and their derived types. A control's current mode can be accessed through its ContainerControl.AutoScaleMode property.

Most business applications should use the Font automatic scaling mode. The Dpi scaling mode is useful for graphics-based applications and is compatible with the default scaling used by the .NET Compact Framework.

Important noteImportant Note:

In the .NET Framework versions 1.0 and 1.1, automatic scaling was supported using a simpler mechanism that always relied on the current system font. This mechanism is now obsolete but still supported for backward compatibility. You can obtain the older scaling behavior by setting the AutoScale property of the containing Form to true, which will also implicitly set the ContainerControl.AutoScaleMode property to None. Conversely, setting the ContainerControl.AutoScaleMode property of a form will set AutoScale to false, enabling the newer scaling mechanism introduced with the .NET Framework version 2.0.

Note that for Smartphone applications, this enumeration requires Windows Mobile Version 5.0 software for Smartphones.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0

.NET Compact Framework

Supported in: 3.5, 2.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.