ScaleHelperGetScale(Control) Method
Gets the current scale factor of the specified control. If per-monitor DPI awareness is not enabled, it always returns
SystemScale.
Namespace: KGySoft.WinFormsAssembly: KGySoft.WinForms (in KGySoft.WinForms.dll) Version: 5.0.1
public static PointF GetScale(
this Control control
)
<ExtensionAttribute>
Public Shared Function GetScale (
control As Control
) As PointF
public:
[ExtensionAttribute]
static PointF GetScale(
Control^ control
)
[<ExtensionAttribute>]
static member GetScale :
control : Control -> PointF
- control Control
- The control for which the scale factor is requested.
PointFA
PointF representing the scale factor of the control, where X and Y are the horizontal and vertical scale factors, respectively.In Visual Basic and C#, you can call this method as an instance method on any object of type
Control. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
If the handle of the control is not created yet, or if the control is not hosted in a window, this method returns the value of the SystemScale property.