Programatically Open Zoom & Pan window in VDC

F

Forrest Liu

Hi, I'm developing a windows program using VDC and C#. I need to be able to
show/hide the visio Pan&Zoom window using code. How to do that?
 
H

Hin

I used the following code before and work (but in vdl)
Don't know if it's similar to DirectX control...

C#:

// win is the active drawing window
foreach (Window subwin in win.Windows)
{
// open Pan & Zoom window, if it's not opened before
if (subwin.ID == (int)VisWinTypes.visWinIDPanZoom)
{
if (!subwin.Visible)

BSD.Designer.VisioApplication.DoCmd((short)VisUICmds.visCmdPanZoom);
break;
}
}
 
H

Hin

// win: active drawing window
// AppInstance: Application instance

foreach (Window subwin in win.Windows)
{
// open Pan & Zoom window, if it's not opened before
if (subwin.ID == (int)VisWinTypes.visWinIDPanZoom)
{
if (!subwin.Visible)
AppInstance.DoCmd((short)VisUICmds.visCmdPanZoom);
break;
}
}
 
F

Forrest Liu

Works great. Thanks and Happy Thanksgiving!


Hin said:
// win: active drawing window
// AppInstance: Application instance

foreach (Window subwin in win.Windows)
{
// open Pan & Zoom window, if it's not opened before
if (subwin.ID == (int)VisWinTypes.visWinIDPanZoom)
{
if (!subwin.Visible)
AppInstance.DoCmd((short)VisUICmds.visCmdPanZoom);
break;
}
}
 

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