Leadtools.Forms Namespace > LogicalLength Structure : Convert Method |
public void Convert( double sourceDpi, LogicalUnit destinationUnit, double destinationDpi )
'Declaration Public Sub Convert( _ ByVal sourceDpi As Double, _ ByVal destinationUnit As LogicalUnit, _ ByVal destinationDpi As Double _ )
'Usage Dim instance As LogicalLength Dim sourceDpi As Double Dim destinationUnit As LogicalUnit Dim destinationDpi As Double instance.Convert(sourceDpi, destinationUnit, destinationDpi)
public void Convert( double sourceDpi, LogicalUnit destinationUnit, double destinationDpi )
function Leadtools.Forms.LogicalLength.Convert( sourceDpi , destinationUnit , destinationDpi )
public: void Convert( double sourceDpi, LogicalUnit destinationUnit, double destinationDpi )
Private Sub LogicalLength_LogicalLength() ' create a new logical length that is 1.5 inches Dim lng As LogicalLength = New LogicalLength(1.5f, LogicalUnit.Inch) ' show the length Dim s As String = String.Format("{0}", lng) MessageBox.Show(s) ' convert the length to pixels lng.Convert(150, LogicalUnit.Pixel, 150) ' show s = String.Format("{0}", lng) MessageBox.Show(s) End Sub
private void LogicalLength_LogicalLength() { // create a new logical length that is 1.5 inches LogicalLength lng = new LogicalLength(1.5f, LogicalUnit.Inch); // show the length string s = string.Format("{0}", lng); MessageBox.Show(s); // convert the length to pixels lng.Convert(150, LogicalUnit.Pixel, 150); // show s = string.Format("{0}", lng); MessageBox.Show(s); }
Target Platforms: 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