5

我使用下面给出的代码在 VB.Net for Outlook 中创建了一个自定义任务窗格,我想向用户控件的标题(图像和按钮)添加更多内容,而不仅仅是标题。有没有办法可以做到这一点?

myUserControl1 = New OutlookTaskPane
        myUserControl1.TabStop = True
        Dim width As Integer = myUserControl1.Width
        myCustomTaskPane = Me.CustomTaskPanes.Add(myUserControl1, "My Custom Task Pane")
        myCustomTaskPane.Width = width
        myCustomTaskPane.Visible = True
        myCustomTaskPane.DockPositionRestrict = Microsoft.Office.Core.MsoCTPDockPositionRestrict.msoCTPDockPositionRestrictNoChange

让我知道是否有任何其他方法可以实现这一点。谢谢。

4

1 回答 1

4

不幸的是,TaskPane 标题不可自定义。只有 Add-in Express 支持使用其高级表单区域实现的类似自定义(尽管只能更改标题图标和标题颜色,并且您不能向其中添加 Windows 窗体控件)。另一种选择是实现您自己类型的任务窗格,这样您就可以完全控制 UI;请参阅https://code.msdn.microsoft.com/OlAdjacentWindows/

于 2016-07-05T17:54:24.257 回答