private void ThisAddIn_Startup(object sender, System.EventArgs e) { Application.PresentationBeforeClose += Application_PresentationBeforeClose; tp = new TaskPane(); ctp = this.CustomTaskPanes.Add(tp, Properties.Resources.TaskPaneTitle); ctp.Width = 300; ctp.VisibleChanged += new EventHandler(ctp_VisibleChanged); }