Hi Padmakar,
I think you've got two possibilities with the control:
1. Hide the "Shapes" window
2. Open stencils invisibly.
Examples:
1. This code shows all the sub-windows in a Visio drawing window:
Sub Windows()
Dim w As Visio.Window
For Each w In Visio.ActiveWindow.Windows
Debug.Print w.ID, w.Caption
Next
End Sub
1658 Custom Properties
1653 Pan & Zoom
1670 Size & Position
1669 Shapes
1721 no caption ( but it's the Drawing Explorer window)
So if you close window 1669 "Shapes", then your stencils will not be visible
in the Visio control.
Do it like this:
Sub ToggleWindow()
Dim w As Visio.Window
For Each w In Visio.ActiveWindow.Windows
If w.ID = 1669 Then w.Visible = Not (w.Visible)
Next
End Sub
2. visio.Documents.OpenEx( "Basic Flowchart Shapes.vss", visOpenRO +
visopendocked + visopenhidden)
--
Hope this helps,
Chris Roth
Visio MVP