How can I access my trackpad in C#?
I'm pretty bored this weekend.
I've decided to build a morse code application where I can use my trackpad to tap morse code in and have my app sound it out.
I told you I was bored! :D
Is there some defacto way to access a trackpad in C#? I mean using pressure graphs. Thanks!
I am not familiar 100% with the idea of the trackpad, but I am assuming that the machine you are working with is a laptop, and what you are referring to is something otherwise known as "mousepad".
You can do a couple of things at least in windows. When you tap with your finger you are actually sending "click" events to the windows runtime. If you hold
In .NET any object (Forms/UserControls) that inherits from System.Windows.Forms.Control can subscribe to the following events:
You can time the Difference in time between MouseUp and MouseDown events and react to the resulting timespan ranges. For instance if you hold the mouse for 20 milliseconds then this is some morse-code character, while holding the mouse for 40 milliseconds is some other character.
In the case of the mousepad/trackpad this would be the equivalent of holding your finger on the pad itself.
Some tabs drivers use the mouse input message extra info to send, well, extra information. I think WACOM does this for sending pen pression.
This information can be queried using the GetMessageExtraInfo Function
Maybe you should check if there's something interesting with your pad, but it's probably vendor specific, if anything is even available which is not certain.
链接地址: http://www.djcxy.com/p/3872.html上一篇: 带参数的Spring查找方法注入
下一篇: 我如何在C#中访问我的触控板?