CoreWindow.SetPointerCapture 方法

定義

將指標輸入與應用程式產生關聯。 擷取指標之後,所有與該指標相關聯的後續事件都會由應用程式引發。

public:
 virtual void SetPointerCapture() = SetPointerCapture;
void SetPointerCapture();
public void SetPointerCapture();
function setPointerCapture()
Public Sub SetPointerCapture ()

實作

備註

指標隨時只能由單一應用程式擷取。 只有前景視窗可以擷取指標。 即使指標在應用程式界限之外移動,指標事件仍會繼續。

只有在偵測到連絡人時,才能擷取指標 (按下滑鼠按鍵、觸控點向下鍵、連絡人中的手寫筆) ,而指標位於應用程式的周框內。

指標會在 PointerReleasedPointerCaptureLost 事件上釋放,或明確呼叫 ReleasePointerCapture

適用於