AnchorWindow opens inside stencil

B

Brian

Hi,

I'm using the example for the AnchorBarsUsage in the SDK but have run into a glitch that I can't figure out.

If I have a drawing with the stencil window open (I do this through my .net app on an activex drawing control) and I open an anchor bar, the anchor bar opens within the active stencil window. If I first click on the drawing surface the anchor window (properly) opens there. I've verified this through Graham Widemans DocPgWin, which shows a nesting and that my anchor is opening within the stencil window. My line of code to open the anchor window is:

anchorWindow = visioApplication.ActiveWindow.Windows.Add(...)

I think to fix this I need to set the drawing surface as the active window but for the life of me I can't figure out how to get that window? I've tried all of these lines to try and get the window but they all throw an exception of 'invalid window identifier'

visioApplication.Windows.GetFromID(VisWinTypes.visApplication)
visioApplication.Windows.GetFromID(VisWinTypes.visDrawing)

Not sure what's going on?
 

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