visCmdDrawZoom seems to fail with "Number is not valid"

H

HarryH

I have Visio OCX in my application and I am attempting to perform a Zoom
operation which uses visCmdDrawZoom, but I get an error.

The call in C# is basically:
IOLeCommandTarget cmdTgt = drawingControl.GetOcx();
cmdTgt.Exec(ref VisioCommandHandlerCollection.CLSID_Application,
visCmdDrawZoom, 0, null, null);

This exec call fails with an error message "Number is not valid.".

Any ideas why I am getting this result as all other Visio (Zoom) commands
execute fine?

Thanks.
 
J

JuneTheSecond

visCmdDrawZoom seems not valid even in Visio2003 DoCmd method.
You might be better to chooze another way.
 
M

Mark Nelson [MS]

What about setting the Zoom property of the Window?

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 
H

HarryH

Setting the zoom property of the window seems to work fine.

In fact all zoom operations seem to work fine - except when I try to bring
up the Zoom dialog box with "visCmdDrawZoom", and I get the error message.

I am wondering if I am missing some subtle setup operation or if this option
is broken?

Thanks.

Mark Nelson said:
What about setting the Zoom property of the Window?

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 
M

Mark Nelson [MS]

Not all Visio commands can be invoked programmatically. This might be such
a command.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.

HarryH said:
Setting the zoom property of the window seems to work fine.

In fact all zoom operations seem to work fine - except when I try to bring
up the Zoom dialog box with "visCmdDrawZoom", and I get the error message.

I am wondering if I am missing some subtle setup operation or if this
option
is broken?

Thanks.
 
H

HarryH

OK - thats what I perceive.

I was hoping to have some confirmation on this - Is there any way to verify
if this particular interaction has been verified?

Thanks for all assistance.
 

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