Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当用户在邮件正文中键入内容时,我需要捕获按键事件。当用户按下spacebar前一个单词时,必须从撰写邮件正文中读取。如何在邮件正文的撰写邮件窗口中捕获此按键事件?
任何建议或任何帮助将不胜感激。
您可以通过. _ 为此,您需要访问低级 WIN32 API调用,例如.Word.DocumentInspector.WordEditorSetWindowsHookEx
Word.Document
Inspector.WordEditor
SetWindowsHookEx
这是一篇 MSDN 博客文章,描述了按键事件的用法SetWindowsHookEx和捕获。