Multiple AxDrawing controls and stencils.

S

Stumple

I have multiple AxDrawing control instances I have opened up inside an
application. I have about 3 stencils I need to open up. The problem I am
having is the stencils don't always open up in the right drawing control and
that is if they even do open.

This is the code I am using to open them:

docs.OpenEx(s,
(short)VisOpenSaveArgs.visOpenRO +
(short)VisOpenSaveArgs.visOpenDocked);

That called for each drawing control. If I only have one drawing control
opened at once things work ok most of the time.

Thanks
 
P

Paul Herber

I have multiple AxDrawing control instances I have opened up inside an
application. I have about 3 stencils I need to open up. The problem I am
having is the stencils don't always open up in the right drawing control and
that is if they even do open.

This is the code I am using to open them:

docs.OpenEx(s,
(short)VisOpenSaveArgs.visOpenRO +
(short)VisOpenSaveArgs.visOpenDocked);

The docs bit looks wrong, use the OpenEx method for just the
appropriate document.
 
S

Stumple

The problem is somewhere else. I tried what you said.

I open two drawing controls. I hover one over the other and the one that I
am hoving over gets its stencils set and then I try to set my stencils again
and the one hovering gets its stencils set. After that the hovering window
is always set for the number of times I tried.
 
S

Stumple

That didn't work to well. I couldn't find .SetFocus() in the .net version.
There is .Select() and .BringToFront().
 

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