VB.net Running a procedure behind a Custom Task Pane user control
Hi
I have a Custom Task Pane user control shown in Image 1 below. I want to run a procedure shown in the second image. What code would I used in the AddIn startup to run this?
Any errors? Can you show more code where you are calling it?
Murray Brown
ASKER
Hi. Below is the code that has the variable TpSqlEditCustomTaskPane at the top that I am trying to call from any other part of the project but can't seem to.
Thanks
Public Class ThisAddIn
Private _tpSqlEdit As TpSQLEdit
Public TpSqlEditCustomTaskPane As Microsoft.Office.Tools.CustomTaskPane
Private oUserControl1 As UserControl1
Public oRightTaskPane As Microsoft.Office.Tools.CustomTaskPane
Private Sub ThisAddIn_Startup() Handles Me.Startup
'Fire the Custom TaskPane
AddTpSqlEdit()
AddSideTaskPane()
End Sub
Private Sub ThisAddIn_Shutdown() Handles Me.Shutdown
End Sub
'Create the Custom TaskPane and Dock Bottom
'You must Add your Control here
Private Sub AddTpSqlEdit()
_tpSqlEdit = New TpSqlEdit()
TpSqlEditCustomTaskPane = CustomTaskPanes.Add(_tpSqlEdit, "SELECT Elements")
TpSqlEditCustomTaskPane.DockPosition = Office.MsoCTPDockPosition.msoCTPDockPositionBottom
'Show TaskPane
TpSqlEditCustomTaskPane.Visible = True
End Sub
Private Sub AddSideTaskPane()
oUserControl1 = New UserControl1
oRightTaskPane = CustomTaskPanes.Add(oUserControl1, "FROM Elements")
oRightTaskPane.DockPosition = Office.MsoCTPDockPosition.msoCTPDockPositionRight
'Show TaskPane
oRightTaskPane.Visible = True
End Sub