Imports Leadtools.Forms
Private Sub LogicalPoint_ConvertTo()
' create a new logical point that is 1.5 and 2 inches
Dim pt1 As LogicalPoint = New LogicalPoint(1.5f, 2f, LogicalUnit.Inch)
' show the point
Dim s As String = String.Format("{0}", pt1)
MessageBox.Show(s)
' convert the point to pixels
Dim pt2 As LogicalPoint = pt1.ConvertTo(150, 150, LogicalUnit.Pixel, 150, 150)
' show
s = String.Format("{0}", pt2)
MessageBox.Show(s)
End Sub
using Leadtools.Forms;
private void LogicalPoint_ConvertTo()
{
// create a new logical point that is 1.5 and 2 inches
LogicalPoint pt1 = new LogicalPoint(1.5f, 2f, LogicalUnit.Inch);
// show the point
string s = string.Format("{0}", pt1);
MessageBox.Show(s);
// convert the point to pixels
LogicalPoint pt2 = pt1.ConvertTo(150, 150, LogicalUnit.Pixel, 150, 150);
// show
s = string.Format("{0}", pt2);
MessageBox.Show(s);
}