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.
There is no events for preventing the closing or resizing of task panes in Office applications. You may consider the following scenarious:
Resizeevent you may use the [OnResize] event of the user control.Closeevent 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 theVisibleproperty. So, you may bring the task pane back if you don't want to close it by setting theVisibleproperty to true.Also you may find Advanced Office task panes helpful.