←Select platform

Convert Method

Summary

Returns the value of the source value, converted to its equivalent in the specified destination unit of measure.

Syntax

C#
VB
C++
public static double Convert( 
   double sourceValue, 
   LogicalUnit sourceUnit, 
   double sourceDpi, 
   LogicalUnit destinationUnit, 
   double destinationDpi 
) 
  
Public Shared Function Convert( _ 
   ByVal sourceValue As Double, _ 
   ByVal sourceUnit As Leadtools.Forms.LogicalUnit, _ 
   ByVal sourceDpi As Double, _ 
   ByVal destinationUnit As Leadtools.Forms.LogicalUnit, _ 
   ByVal destinationDpi As Double _ 
) As Double 
public: 
static double Convert(  
   double sourceValue, 
   Leadtools.Forms.LogicalUnit sourceUnit, 
   double sourceDpi, 
   Leadtools.Forms.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 Leadtools.Forms.LogicalUnit.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 Leadtools.Forms.LogicalUnit.Pixel.

Remarks

Convert converts a value measured in a unit specified by sourceUnit to any unit that is specified by destinationUnit. The DPI is only needed when Leadtools.Forms.LogicalUnit.Pixel is used define the area that is occupied by one pixel.

Example

For an example, refer to Width.

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Forms Assembly