TextPattern.RangeFromPoint Method
.NET Framework 3.0
Returns the degenerate (empty) text range nearest to the specified screen coordinates.
Namespace: System.Windows.Automation
Assembly: UIAutomationClient (in uiautomationclient.dll)
Assembly: UIAutomationClient (in uiautomationclient.dll)
public TextPatternRange RangeFromPoint ( Point screenLocation )
public function RangeFromPoint ( screenLocation : Point ) : TextPatternRange
Not applicable.
Parameters
- screenLocation
The location in screen coordinates.
Return Value
A degenerate range nearest the specified location. Null is never returned.| Exception type | Condition |
|---|---|
| A given point is outside the AutomationElement associated with the text pattern. |
A text range that wraps a child object is returned if the screen coordinates are within the coordinates of an image, hyperlink, Microsoft Excel spreadsheet, or other embedded object.
Because hidden text is not ignored by RangeFromPoint, a degenerate range from the visible text closest to the given point is returned.
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.