Where did the 'Shapes' pane disappear in the 2010 version of the Microsoft Office Visio 14.0 Drawing Control ?
It seems that in the latest version (2010) of the 'VisOcx.dll' control, the left hand side
instruments panel does not show up anymore.
I looked into this and tried to get some feedback from our Visio developers. According to their reply: yes, it is expected behavior. Having the 'Shapes' pane show-up by default was disabled, primarily because of the feedback we were receiving from the customers: on most instances when this control was used, the developers were programmatically adding all the needed shapes to the drawing canvas. The good news is that this feature can be re-enabled by code.
How to enumerate all the available hidden panes
To demonstrate how can we list all the available Visio panes, we need to start with a new Visual Studio Windows Forms project and then we have to insert a reference to the Visio Interop class. Please note that in order for you to be able to use the Visio Control, you need to have the main application installed .. there is no stand-alone (redistributable) version available for VisOcx.dll.
About Using the Visio Drawing Control in Your Application
To install the Visio Drawing Control, install Visio. When you install Visio, you can choose various installation options, including the Minimal Install option. If you want to minimize the installation file size of Visio on your computer, you can choose Minimal Install, which installs only the minimum required Visio components, including the Visio drawing application and the Visio Drawing Control. This
This code sniped will help you enumerate all the Visio Window components:
Dim wnd As Microsoft.Office.Interop.Visio.Window
For Each wnd InAxDrawingControl1.Window.Windows
As you can see, the pane we are interested in has this ID: 1669.
You can use the VBA-style Debug.Print statement in a Visual Studio project to write to the Output window, if you add a reference to: System.Diagnostics.
The full code listing:
For more information about working with the Microsoft Visio Drawing Control, please review this articles:
> http://www.eggheadcafe.com/community/csharp/2/10295201/using-microsoft-office-visio-140-drawing-control-in-a-c-wpf-project.aspx (Using Microsoft Office Visio 14.0 Drawing Control in a C# WPF Project)
> http://msdn.microsoft.com/en-us/magazine/cc164043.aspx (Host an Interactive Visio Drawing Surface in .NET Custom Clients)