vbtrying said:
I FOUND THE RESOLUTION !!!
If you create a new form and add the tabcontrol BEFORE you add the
taskpane
(from vbpowerpack), it works. If you add the taskpane BEFORE you add the
tabcontrol, the tabcontrol does not function the way it should.
I've not used vbpowerpack so I hadn't seen this, but the problem is in the
TaskPaneDesigner.
After looking through the Active bugs I see that you cannot edit menus
either.
Both of these problems are related and it took just a few minutes to find
the error, so I have no Idea why the original author has not fixed it after
several months.
The problem and the fix are shown below so you can modify the source and fix
your version, but I didn't look too hard at the code so there may be 1001
other problems that need sorting out
in the OnSelectionChanged() method you'll see this code:
\\\
If Not selsvc Is Nothing Then
c = selsvc.PrimarySelection
If Not c Is Nothing Then
tf = CType(c, TaskFrame)
If Not tf Is Nothing Then
Me.m_lastFrameSelected = tf
tf.Parent.Refresh()
End If
End If
End If
///
Change it as follows:
\\\
If Not selsvc Is Nothing Then
c = selsvc.PrimarySelection
If Not c Is Nothing Then
If TypeOf c Is TaskFrame Then '<-- Added extra check
tf = CType(c, TaskFrame)
If Not tf Is Nothing Then
Me.m_lastFrameSelected = tf
tf.Parent.Refresh()
End If
End If
End If
End If
///