question

LiangChunLin-9423 avatar image
0 Votes"
LiangChunLin-9423 asked ·

How to detect point behind background app?

According " Handle pointer input " , there is a "PointerRoutedEventArgs e" can get a point object.

PointerPoint ptrPt = e.GetCurrentPoint(Target);

https://docs.microsoft.com/en-us/windows/uwp/design/input/handle-pointer-input#pointer-event-example


But I want to get the PointerPoint under the background app. I can't find useful information about such method / function to get the "PointerRoutedEventArgs" trigger for background app.

How could I get it ?

windows-uwp
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RichardZhang-MSFT avatar image
0 Votes"
RichardZhang-MSFT answered ·

Hello,​

Welcome to our Microsoft Q&A platform!

For UWP applications, Pointer events can only be captured when the application is running in the foreground and the cursor is moved in the application.

There is currently no API in UWP to capture pointer events outside the app.

Thanks.

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.