运行单独的线程来轮询设备并将按键事件发送到闪存

发布于 2024-12-19 12:58:07 字数 213 浏览 5 评论 0原文

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

ゞ记忆︶ㄣ 2024-12-26 12:58:07

按键是一个不需要单独线程的事件。事件发生后要采取的操作 - 在您的情况下,可以通过单独的线程发送一些数据到闪存。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文