Stencil window shouldn't be closed. How to make it?

N

Nikita

Hi 8)
Stencils window in my application shouldn't be closed since I'm using
ActiveX control embedded in my C# application.

So I can catch the event "BeforeDocumentClose" for the stencil document, but
I can't use the event "QueryCancelDocumentClose" because it seems that it
really doesn't matter for Visio what I return in "QueryCancelDocumentClose" -
it just closes it and that's all.

What do suggest?
 
C

Chris Roth [ Visio MVP ]

Check out the window events. The stencil window is a window within a window.
It looks something like this:

ActiveWindow.Windows.Item( ??? ).Visible = True/False

where ActiveWindow is some drawing window that you care about. You should
convert the ActiveX control's window to a Visio window, then look inside for
the sub-windows.

The .Windows collection has five or so windows for Custom Properties,
Shapes, Doc Explorer and so on. You can easily toggle their visibility.
Hopefully you can catch when they get closed - I can't remember off the top
of my head if this works.

--

Hope this helps,

Chris Roth
Visio MVP
 

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