运行单独的线程来轮询设备并将按键事件发送到闪存
我有一个 Windows 应用程序,在其中我必须连续监听顶部有按钮的设备,当按下这些按钮中的任何一个时,我需要向 flash 发送按键事件。
为了实现这一点,我有以下问题:-
• 在单独的线程中连续侦听设备事件的最佳方法是什么(与 Flash 动画同时工作)?
• 我可以使用计时器来实现此功能吗?
• 最后,如何将按键事件发送到Flash?
I have a windows application in which I have to continuously listen to a device which has buttons on the top and when any of these buttons are pressed I need to send a keypress event to flash.
For implementing this I have following questions:-
• What is the best way to continuously listen to a device events in a separate thread(to work simultaneously with flash animation)?
• Can I use timers for this functionality?
• Finally, how keypress event can be dispatched to flash?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
按键是一个不需要单独线程的事件。事件发生后要采取的操作 - 在您的情况下,可以通过单独的线程发送一些数据到闪存。
Keypress is an event which shouldn't require a separate thread. The action to be taken once the event takes place - in your case sending some data to flash can be done via a separate thread.