Remove "Search for Shapes" from ActiveX control

D

Dave Taylor

I'm trying to develop with the Visio 2003 ActiveX control. I would like to
display a predefined stencil set and not allow the user to "Search for
Shapes" (all the ones he needs for this app are already in the stencil). Is
there any way to remove this option from the stencil window?

Thanks

Dave
 
M

Mai-lan [MS]

Hi, Dave: If you just want to turn off the Visio Find Shapes window on the stencil pane, you can do something like this:

Public Sub ShapeSearchWindowVisible( _
ByVal targetWindow As Microsoft.Office.Interop.Visio.Window, _
ByVal visible As Boolean)

Dim searchWindow As Microsoft.Office.Interop.Visio.Window

Try

searchWindow = targetWindow.Windows.ItemFromID( _
Microsoft.Office.Interop.Visio.VisWinTypes.visWinIDShapeSearch)

If (Not searchWindow Is Nothing) Then
searchWindow.Visible = visible
End If

Catch err As Exception
System.Diagnostics.Debug.WriteLine(err.Message)
End Try

End Sub

Thanks,
Mai-lan
 
D

Dave Taylor

Perfect!!! Thank for the quick reply Mai-lan!


Mai-lan said:
Hi, Dave: If you just want to turn off the Visio Find Shapes window on the
stencil pane, you can do something like this:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top