Version

GetXOffsetFromCharacterIndex Method

Returns the horizontal offset (in pixels) from the beginning of the line where the character with the specified character index is located.
Syntax
'Declaration
 
Public Function GetXOffsetFromCharacterIndex( _
   ByVal characterIndex As Integer _
) As Double
public double GetXOffsetFromCharacterIndex( 
   int characterIndex
)

Parameters

characterIndex
The zero based index of the character within the line whose X offset is to be returned.

Return Value

The horizontal offset (in pixels) from the beginning of the line where the character with the specified character index is located
Remarks

Note: If a character index is specified that is beyond the last character on the line, the X offset of the last character on the line is returned.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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

See Also