Leadtools.Forms Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
Value Property
See Also  Example
Leadtools.Forms Namespace > LogicalLength Structure : Value Property



Gets or sets a value that represents the length for this LogicalLength.

Syntax

Visual Basic (Declaration) 
Public Property Value As Double
Visual Basic (Usage)Copy Code
Dim instance As LogicalLength
Dim value As Double
 
instance.Value = value
 
value = instance.Value
C# 
public double Value {get; set;}
C++/CLI 
public:
property double Value {
   double get();
   void set (double value);
}

Return Value

Value that indicates the length.

Example

This example converts the length value from inch to pixels units.

Visual BasicCopy Code
Public Sub LogicalLength_ConvertedValue()
   ' create a new logical length with value of 1.5 in inches
   Dim lng As LogicalLength = New LogicalLength(1.5f, LogicalUnit.Inch)
   Dim s As String
   ' show the length
   s = String.Format("Length is {0}", lng)
   MessageBox.Show(s)

   ' show the length value component converted to pixels
   s = String.Format("length is {0}, {1} Pixels", LogicalUnitConverter.Convert(lng.Value, LogicalUnit.Inch, 150, LogicalUnit.Pixel, 150))
   MessageBox.Show(s)
End Sub
C#Copy Code
public void LogicalLength_ConvertedValue() 

   // create a new logical length with value of 1.5 in inches 
   LogicalLength lng = new LogicalLength(1.5f, LogicalUnit.Inch); 
   string s; 
   // show the length 
   s = string.Format("Length is {0}", lng); 
   MessageBox.Show(s); 
 
   // show the length value component converted to pixels 
   s = string.Format("length is {0}, {1} Pixels", LogicalUnitConverter.Convert(lng.Value, LogicalUnit.Inch, 150, LogicalUnit.Pixel, 150)); 
   MessageBox.Show(s); 
}

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also

Leadtools.Forms requires a Forms Module license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features