ITextProvider.RangeFromPoint(Point) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳最接近指定螢幕座標的退化(空)文字範圍。
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
螢幕座標中的位置。
傳回
一個退化範圍,最接近指定位置。 空參考(Nothing 在 Visual Basic)永遠不會回傳。
例外狀況
如果某個點不在與文字圖案相關的 使用者介面自動化 元素之外,
備註
若螢幕座標位於影像、超連結或其他嵌入物件的座標內,則回傳包含子物件的文字範圍。
因為隱藏文字不會被 RangeFromPoint 退化範圍忽略,從最接近該點的可見文字開始。