Version

ConvertUnits Method

Converts the specified floating-point value based on the specified units of measurement.
Syntax
'Declaration
 
Public Shared Function ConvertUnits( _
   ByVal value As Single, _
   ByVal from As UnitOfMeasurement, _
   ByVal to As UnitOfMeasurement _
) As Single
public static float ConvertUnits( 
   float value,
   UnitOfMeasurement from,
   UnitOfMeasurement to
)

Parameters

value
The value to convert.
from
A UnitOfMeasurement constant which defines the unit of measure of the specified value.
to
A UnitOfMeasurement constant which defines the unit of measure of the returned value.

Return Value

The converted value.
Remarks

Use the Unit property to define the implied unit of measure for all properties which represent a linear graphical quantity such as font sizes, cell widths, picture positions, etc.

One inch is equal to 1,440 twips (twentieths of a desktop point).

One inch is equal to 72 desktop points.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also