Leadtools.Forms Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
Convert Method
See Also 
Leadtools.Forms Namespace > LogicalUnitConverter Class : Convert Method



sourceValue
The value that is going to be converted.
sourceUnit
The unit of measurement for the source value.
sourceDpi
Represents the DPI of the source value. This value is only used if the source unit of measure is .Pixel.
destinationUnit
The unit of measurement for the destination value.
destinationDpi
Represents the DPI of the destination value. This value is only used if the destination unit of measure is .Pixel.
sourceValue
The value that is going to be converted.
sourceUnit
The unit of measurement for the source value.
sourceDpi
Represents the DPI of the source value. This value is only used if the source unit of measure is .Pixel.
destinationUnit
The unit of measurement for the destination value.
destinationDpi
Represents the DPI of the destination value. This value is only used if the destination unit of measure is .Pixel.
Returns the value of the source value, converted to its equivalent in the specified destination unit of measure.

Syntax

Visual Basic (Declaration) 
Public Shared Function Convert( _
   ByVal sourceValue As Double, _
   ByVal sourceUnit As LogicalUnit, _
   ByVal sourceDpi As Double, _
   ByVal destinationUnit As LogicalUnit, _
   ByVal destinationDpi As Double _
) As Double
Visual Basic (Usage)Copy Code
Dim sourceValue As Double
Dim sourceUnit As LogicalUnit
Dim sourceDpi As Double
Dim destinationUnit As LogicalUnit
Dim destinationDpi As Double
Dim value As Double
 
value = LogicalUnitConverter.Convert(sourceValue, sourceUnit, sourceDpi, destinationUnit, destinationDpi)
C# 
public static double Convert( 
   double sourceValue,
   LogicalUnit sourceUnit,
   double sourceDpi,
   LogicalUnit destinationUnit,
   double destinationDpi
)
C++/CLI 
public:
static double Convert( 
   double sourceValue,
   LogicalUnit sourceUnit,
   double sourceDpi,
   LogicalUnit destinationUnit,
   double destinationDpi
) 

Parameters

sourceValue
The value that is going to be converted.
sourceUnit
The unit of measurement for the source value.
sourceDpi
Represents the DPI of the source value. This value is only used if the source unit of measure is .Pixel.
destinationUnit
The unit of measurement for the destination value.
destinationDpi
Represents the DPI of the destination value. This value is only used if the destination unit of measure is .Pixel.

Example

For an example, refer to Width.

Remarks

Convert converts a value measured in a unit specified by to any unit that is specified by . The DPI is only needed when .Pixel is used define the the area that is occuppied by one pixel.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also

Leadtools.Forms requires a Forms Module license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features