0

I wrote a vsto word addins, and I create a customTaskPane control to show some messages or web page, but I found there is no way to disable close/resize button on taskpane. so that we cannot suspend customer's close action.Do anyone know how to disable it and use own buttons?

Use custom task pane visible and unvisible events, but it happeds after taskpane hided.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
Ivan
  • 1
  • 1

1 Answers1

0

There is no events for preventing the closing or resizing of task panes in Office applications. You may consider the following scenarious:

  1. To handle the Resize event you may use the [OnResize] event of the user control.
  2. To handle the Close event you may use the CustomTaskPane.VisibleChanged event which is fired when the user displays or closes the custom task pane, or when code changes the value of the Visible property. So, you may bring the task pane back if you don't want to close it by setting the Visible property to true.

Also you may find Advanced Office task panes helpful.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45