VB中如何实现键盘快捷键
我想知道是否可以使用 VB.NET 自动输入键盘快捷键,如果可以的话如何实现。
在我正在开发的应用程序中,它作为 Outlook 插件接收电子邮件并运行各种检查,如果这些检查是肯定的,它将有关该消息的信息插入数据库。
但我希望能够告诉它,当主题 =“关键字”执行 Ctrl+Alt+↑ 时,本质上是一个恶作剧。
然而我在任何地方都找不到任何相关内容,我找到的只是“VB.NET 中的自定义快捷方式”以及有关 KeyDown、KeyUp 和 KeyPress 事件的内容。
谢谢
I would like to know if it's possible, and if so how, to use VB.NET to automate the input of a keyboard shortcut.
In the application i am developing, it receives email as a outlook addin and runs various checks and if those checks are positive it inserts information about the message into the database.
But i want to be able to tell it that when the subject = "Keyword" to perform Ctrl+Alt+↑ for, essentially a prank.
However I can't find anything on this anywhere, all i find is "Custom Short-cuts In VB.NET" and stuff about the KeyDown, KeyUp and KeyPress events.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为执行此类操作的最简单方法是使用
SendKeys
方法。未经测试,我认为 Ctrl+Alt+↑ 看起来像:MSDN SendKeys
I think the easiest way to do such a thing would be to use the
SendKeys
method. Untested I think Ctrl+Alt+↑ would look like:MSDN SendKeys