使用C#捕获MS Word中的keydown事件 [英] Capturing keydown event of MS Word using C#
问题描述
我想建立一个办公室插件,需要使用C#来捕获keydown事件在MS-Word中。 ?有人可以给我我怎么能做到这一点的例子
I'm trying to develop an office add-on and need to capture the keydown event on MS-Word using C#. can somebody give me an example on how i can do that?
推荐答案
这看起来像一个重复:的How拿到"&的KeyPress QUOT;从Word 2010加载项事件(在C#开发)?
This looks like a duplicate of: How to get the "KeyPress" event from a Word 2010 Addin (developed in C#)?
在这个问题的这个答案链接在MSDN论坛上一个类似的问题:的 http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/7198a84f-4a37-474b-93b5-1e6f38d5d139 。在对MSDN论坛接受的答案是指出:
In that question this answer links to a similar question on the MSDN forum: http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/7198a84f-4a37-474b-93b5-1e6f38d5d139. In the accepted answer on the MSDN forum it is stated that:
有什么话API或VSTO可以拿起按键英寸
没有什么内置的,你可以在一个VSTO项目中使用拿起
键击。
there's nothing in the Word API or VSTO that can pick up keystrokes. There's nothing built-in that you can use in a VSTO project to pick up the keystrokes.
然而,在MSDN论坛上接受的答案还谈到涉及的 WindowSelectionChange
事件 - 它可能是在寻找有用
However, the accepted answer on the MSDN forum also talks about a possible solution involving the WindowSelectionChange
event - it might be useful to look in to.
这篇关于使用C#捕获MS Word中的keydown事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!