LEADTOOLS Forms (Leadtools.Forms assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
Subtract Method
See Also 
Leadtools.Forms Namespace > LogicalLength Structure : Subtract Method



left
The LogicalLength on the left side of the subtraction operator.
right
The LogicalLength on the right side of the subtraction operator.

The Subtract Method is available as an add-on to the LEADTOOLS Document and Medical Imaging toolkits.

left
The LogicalLength on the left side of the subtraction operator.
right
The LogicalLength on the right side of the subtraction operator.
Subtracts the length of the specified LogicalLength object from this LogicalLength structure.

Syntax

Visual Basic (Declaration) 
Public Shared Function Subtract( _
   ByVal left As LogicalLength, _
   ByVal right As LogicalLength _
) As LogicalLength
Visual Basic (Usage)Copy Code
Dim left As LogicalLength
Dim right As LogicalLength
Dim value As LogicalLength
 
value = LogicalLength.Subtract(left, right)
C# 
public static LogicalLength Subtract( 
   LogicalLength left,
   LogicalLength right
)
C++/CLI 
public:
static LogicalLength Subtract( 
   LogicalLength left,
   LogicalLength right
) 

Parameters

left
The LogicalLength on the left side of the subtraction operator.
right
The LogicalLength on the right side of the subtraction operator.

Example

This example subtracts two length structures.

Visual BasicCopy Code
'''This example subtracts two length structures.
Public Sub LogicalLength_Subtract()
   Dim lng1 As LogicalLength = New LogicalLength(200, LogicalUnit.Pixel)
   Dim lng2 As LogicalLength = New LogicalLength(1.5F, LogicalUnit.Inch)
   Dim s As String = String.Format("lng1 - lng2 = {0}", LogicalLength.Subtract(lng1, lng2))
   MessageBox.Show(s)
End Sub
C#Copy Code
///This example subtracts two length structures.
public void LogicalLength_Subtract()
{
   LogicalLength lng1 = new LogicalLength(200, LogicalUnit.Pixel);
   LogicalLength lng2 = new LogicalLength(1.5F, LogicalUnit.Inch);
   string s = string.Format("lng1 - lng2 = {0}", LogicalLength.Subtract(lng1, lng2));
   MessageBox.Show(s);
}

Remarks

The subtraction will be done based on left unit.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also

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