Leadtools.Forms Namespace > LogicalPoint 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 LogicalPoint 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 )
Imports Leadtools.Forms Private Sub LogicalPoint_LogicalPoint() ' create a new logical point that is 1.5 and 2 inches Dim pt As LogicalPoint = New LogicalPoint(1.5f, 2f, LogicalUnit.Inch) ' show the point Dim s As String = String.Format("{0}", pt) MessageBox.Show(s) ' convert the point to pixels pt.Convert(150, 150, LogicalUnit.Pixel, 150, 150) ' show s = String.Format("{0}", pt) MessageBox.Show(s) End Sub
using Leadtools.Forms; private void LogicalPoint_LogicalPoint() { // create a new logical point that is 1.5 and 2 inches LogicalPoint pt = new LogicalPoint(1.5f, 2f, LogicalUnit.Inch); // show the point string s = string.Format("{0}", pt); MessageBox.Show(s); // convert the point to pixels pt.Convert(150, 150, LogicalUnit.Pixel, 150, 150); // show s = string.Format("{0}", pt); MessageBox.Show(s); }