Leadtools.Forms Namespace > LogicalSize Structure : Convert Method |
public void Convert( double sourceDpiX, double sourceDpiY, LogicalUnit destinationUnit, double destinationDpiX, double destinationDpiY )
'Declaration Public Sub Convert( _ ByVal sourceDpiX As Double, _ ByVal sourceDpiY As Double, _ ByVal destinationUnit As LogicalUnit, _ ByVal destinationDpiX As Double, _ ByVal destinationDpiY As Double _ )
'Usage Dim instance As LogicalSize Dim sourceDpiX As Double Dim sourceDpiY As Double Dim destinationUnit As LogicalUnit Dim destinationDpiX As Double Dim destinationDpiY As Double instance.Convert(sourceDpiX, sourceDpiY, destinationUnit, destinationDpiX, destinationDpiY)
public void Convert( double sourceDpiX, double sourceDpiY, LogicalUnit destinationUnit, double destinationDpiX, double destinationDpiY )
function Leadtools.Forms.LogicalSize.Convert( sourceDpiX , sourceDpiY , destinationUnit , destinationDpiX , destinationDpiY )
public: void Convert( double sourceDpiX, double sourceDpiY, LogicalUnit destinationUnit, double destinationDpiX, double destinationDpiY )
Private Sub LogicalSize_LogicalSize() ' create a new logical size that is 1.5 and 2 inches Dim sz As LogicalSize = New LogicalSize(1.5f, 2f, LogicalUnit.Inch) ' show the size Dim s As String = String.Format("{0}", sz) MessageBox.Show(s) ' convert the size to pixels sz.Convert(150, 150, LogicalUnit.Pixel, 150, 150) ' show s = String.Format("{0}", sz) MessageBox.Show(s) End Sub
private void LogicalSize_LogicalSize() { // create a new logical size that is 1.5 and 2 inches LogicalSize sz = new LogicalSize(1.5f, 2f, LogicalUnit.Inch); // show the size string s = string.Format("{0}", sz); MessageBox.Show(s); // convert the size to pixels sz.Convert(150, 150, LogicalUnit.Pixel, 150, 150); // show s = string.Format("{0}", sz); 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