gotfocus事件处理程序msWord C# [英] gotfocus eventhandler msWord C#
问题描述
您好,
我想知道命令栏是否已集中在Microsoft Word上.我找到了一种设置焦点的方法,例如
oWord.CommandBars.FindControl(1,3, null <字体大小= 2>, <字体颜色=#0000ff"大小= 2> <字体颜色=#0000ff"大小= 2>空 )) .SetFocus();
但似乎无法找到对应的getFocus方法.我正在使用如何使用Visual C#.NET处理Word事件".来自 http://support.microsoft.com/default.aspx/kb的示例/302817 .我注意到有一个事件处理程序( Word. OCXEvents_GotFocusEventHandler )用于GotFocus事件,但我不知道如何设置它.
任何帮助将不胜感激.
谢谢.
Hi,
I would like to know if a commandbar has got focus in microsoft word. I have found a method to set the focus e.g.
//save button
oWord.CommandBars.FindControl(1, 3, null, null).SetFocus();
but cannot seem to find a corresponding method to getFocus. I am working with the "How To Handle Events for Word by Using Visual C# .NET" example from http://support.microsoft.com/default.aspx/kb/302817. I notice there is an event handler (Word.OCXEvents_GotFocusEventHandler) for GotFocus events but I do not know how to set it up.
Any help would be much appreciated.
Thanks.
推荐答案
像一个C#问题.这是有关Word对象模型的问题.
This does not look like a C# question. It's a question about Word object model.
这篇关于gotfocus事件处理程序msWord C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!