Visio tool bars cannot be used on the form of Visual Studio 2003 and 2005.
You might built your own toolbars.
But, you can display Visio tool bars on the windows desktop, if the tool
bars are flotaing and enabled. Please note that the dispplayed tool bars
cannot be positioned in the form just floating on the windows desktop. My
example is as shown.
Public Sub FloatingToolBar(ByVal LocalName As String)
Dim cbars As Microsoft.Office.Core.CommandBars
Dim cbar As Microsoft.Office.Core.CommandBar
Dim cbButton As Microsoft.Office.Core.CommandBarButton
Dim cbCombo As Microsoft.Office.Core.CommandBarComboBox
Dim I As Long, N As Long
Dim Space As Long
On Error GoTo ERRHAND
cbars = MyApp.CommandBars
Space = 45
N = cbars.Count
For I = 1 To N
cbar = cbars(I)
Debug.WriteLine(cbar.NameLocal)
If cbar.NameLocal = LocalName Then
cbar.Visible = True
cbar.Position =
Microsoft.Office.Core.MsoBarPosition.msoBarFloating
If cbar.Visible = True And cbar.Enabled = True Then
Select Case (cbar.NameLocal)
Case "Standard"
cbar.Top = 40 + Space
Case "Formatting"
cbar.Top = 40 + Space * 2
Case "Draw"
cbar.Top = 40 + Space * 3
Case "Formatting Text"
cbar.Top = 40 + Space * 4
Case "Formatting ...."
cbar.Top = 40 + Space * 5
Case "Formatting..."
cbar.Top = 40 + Space * 6
Case "Menu Bar" (Menu bar does not appear.)
cbar.Top = 40
Case Else
cbar.Top = 40 + Space * 7
End Select
End If
cbar.Left = 200
Exit For
End If
Next
Exit Sub
ERRHAND:
MsgBox(Err.Description)
End Sub