AutomationElement.TryGetClickablePoint(Point) 方法

定義

擷取可按元素內的一個點。

public:
 bool TryGetClickablePoint([Runtime::InteropServices::Out] System::Windows::Point % pt);
public bool TryGetClickablePoint (out System.Windows.Point pt);
member this.TryGetClickablePoint : Point -> bool
Public Function TryGetClickablePoint (ByRef pt As Point) As Boolean

參數

pt
Point

這個方法傳回時,會包含可按點的實際螢幕座標。

傳回

Boolean

true 表示此點可按;否則為 false

範例

下列範例會嘗試擷取 上的 AutomationElement 可點選點。

// element is an AutomationElement.
System.Windows.Point pt;
bool clickable = element.TryGetClickablePoint(out pt);
' element is an AutomationElement.
Dim pt As System.Windows.Point
Dim clickable As Boolean = element.TryGetClickablePoint(pt)

備註

AutomationElement如果另一個視窗完全遮蔽,則無法按一下 。

適用於

另請參閱