C# Visual Studio中导入的Outlook窗体区域上的按钮选项卡Index?
我有OL&VS2010。如果我直接在VS中设计表单区域,那么C# Visual Studio中导入的Outlook窗体区域上的按钮选项卡Index?,c#,outlook-addin,tabindex,C#,Outlook Addin,Tabindex,我有OL&VS2010。如果我直接在VS中设计表单区域,那么FormRegion.Designer.cs文件将包含如下定义: this.SomeButton = new System.Windows.Forms.Button(); 但如果在OL中设计并导入,则定义如下: this.SomeButton = (Microsoft.Office.Interop.Outlook.OlkCommandButton)GetFormRegionControl("SomeButton"); 我的问题是,S
FormRegion.Designer.cs
文件将包含如下定义:
this.SomeButton = new System.Windows.Forms.Button();
但如果在OL中设计并导入,则定义如下:
this.SomeButton = (Microsoft.Office.Interop.Outlook.OlkCommandButton)GetFormRegionControl("SomeButton");
我的问题是,System.Windows.Forms.Button
有一个我可以通过编程设置的TabIndex
属性,但是Microsoft.Office.Interop.Outlook.OlkCommandButton
没有
如何将
OlkCommandButton
的TabIndex
?我可以将Microsoft.Office.Interop.Outlook.OlkCommandButton
转换为Microsoft.Vbe.Interop.Forms.Control
并通过这种方式访问元素的TabIndex
编辑-确认: