开发者

Button TabIndex on imported Outlook form regions in Visual Studio?

开发者 https://www.devze.com 2023-03-07 23:02 出处:网络
I have OL开发者_如何学Go&VS 2010. If I design a form region directly in VS, then the FormRegion.Designer.cs file will contain definitions like:

I have OL开发者_如何学Go&VS 2010. If I design a form region directly in VS, then the FormRegion.Designer.cs file will contain definitions like:

this.SomeButton = new System.Windows.Forms.Button();

but if designed in OL and imported, the definitions are:

this.SomeButton = (Microsoft.Office.Interop.Outlook.OlkCommandButton)GetFormRegionControl("SomeButton");

My problem is that a System.Windows.Forms.Button has a TabIndex property that I can programmatically set, but a Microsoft.Office.Interop.Outlook.OlkCommandButton does not.

How can I change an OlkCommandButton's TabIndex?


I was able to cast a Microsoft.Office.Interop.Outlook.OlkCommandButton to a Microsoft.Vbe.Interop.Forms.Control and access the element's TabIndex that way.

Edit - Confirmed: http://blogs.msdn.com/b/rgregg/archive/2007/10/01/common-properties-on-outlook-controls.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消