Share via


ITextProvider.RangeFromPoint(Point) 方法

定義

傳回最接近指定之螢幕座標的變質 (空) 文字範圍。

public:
 System::Windows::Automation::Provider::ITextRangeProvider ^ RangeFromPoint(System::Windows::Point screenLocation);
public System.Windows.Automation.Provider.ITextRangeProvider RangeFromPoint (System.Windows.Point screenLocation);
abstract member RangeFromPoint : System.Windows.Point -> System.Windows.Automation.Provider.ITextRangeProvider
Public Function RangeFromPoint (screenLocation As Point) As ITextRangeProvider

參數

screenLocation
Point

螢幕座標中的位置。

傳回

ITextRangeProvider

最接近指定位置的變質範圍。 從未傳回 Null 參考 (在 Visual Basic 中為 Nothing)。

例外狀況

如果指定的點位於與文字模式相關聯的消費者介面自動化專案之外。

備註

如果螢幕座標位於影像、超連結或其他内嵌物件的座標內,則會傳回括子物件的文字範圍。

因為隱藏文字不會被 RangeFromPoint 從最接近指定點的可見文字變質範圍忽略。

適用於

另請參閱