Monitoring Shapes Window

A

Al Edlund

well you can do it with a DoCmd something like this

Private Sub PanZoomToolStripMenuItem_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles PanZoomToolStripMenuItem.Click

Dim vsoWindow As visio.Window

Dim vsoApplication As visio.Application

vsoWindow = AxDrawingControl1.Window

vsoApplication = vsoWindow.Application

vsoApplication.DoCmd(visCmdPanZoom)

End Sub

or you can use somethink like this (visio windows types are enumerated in
the documentation)



Private Sub setVisioExtraWindowVisibility( _

ByVal targetWindow As Microsoft.Office.Interop.Visio.Window, _

ByVal visVWT As Microsoft.Office.Interop.Visio.VisWinTypes, _

ByVal visible As Boolean)

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

Try

' for identified window set the visibility attribute

searchWindow = targetWindow.Windows.ItemFromID(visVWT)

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

al
 
M

Mishaev Mark

Hi,

In the application I'm developing, there is "view" item which enables to
open/close shapes window (stencils window).

This menu item could be checked or unchecked, depends on the shapes window
status (open/close).
The problem is that I don't know how to catch shapes window open/close
events or to ask about status of this window, i.e. if it's open or close.



Thanks,
Mark.
 

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