检测StylusDown之外的应用程序窗口 [英] Detect StylusDown outside app window

查看:189
本文介绍了检测StylusDown之外的应用程序窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简单的问题,希望答案不会是:你不能: - )

Simple question, hope the answer won't be: "You cant" :-)

如何(在code)我可以订阅一个全球性向下手写笔事件。 Windows 7中显然不以某种方式,为小药片图标,只要我使用触控笔出现(wacomm笔和触摸,但是这似乎不相关的)。

How (in code) can I subscribe to a "global" stylus down event. Windows 7 obviously does it in some way, as the little tablet icon appears as soon as I use the stylus (wacomm pen and touch, but this seems irrelevant).

我想创建一个简单的绘图应用程序,它在后台默默(可能是一个小任务栏图标)运行,并弹出当我拿起笔,开始绘制。

I want to create a simple drawing app which runs silently in the background (perhaps a small taskbar icon) and pops up as soon as I pick up the stylus and start drawing..

我能够做所有这些事情有一个窗口,但StylusDown是一个附加的UI属性。有一些全球性?

I am able to do all these things with a window, but the StylusDown is an attached UI property. Is there some global property?

一个半透明窗口覆盖所有的桌面上所有的时间是不是真的替代。

A semi transparent window overlaying all of my desktop all the time is not "really" an alternative..

克里斯

推荐答案

短:

您不能。 : - )

龙:

您的方式使用的P / Invoke调用Windows API函数的 GetCursorPos 的。

You way use p/invoke to call the windows API function GetCursorPos.

[DllImport("user32.dll")]
public static extern bool GetCursorPos(out Point pt);

您可能需要定期调用该函数定时器是最新的。

You may want to call this function periodically with a timer to be up to date.

这篇关于检测StylusDown之外的应用程序窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆