shape protection using C#

B

Bubily

Hi

I'm using activex visio component in c# windows application. I am using a
default shape in page. I want to give protection to this shape forever,Is
any way to achieve this programatically.

Thanks in advance,

Bubily
 
C

Chris Roth [ Visio MVP ]

What kind of protection? Text edit? Resize? Deletion?

Format > Protect in Visio allows you to set some of these items.

Via code, it looks like:

Visio.Shape shp = visApp.ActiveWindow.Selection[1];
shp.cells["LockWidth"].resultIU = 1;
shp.cells["LockHeight"].resultIU = 1;

Open Window > Show ShapeSheet and look for the Protection section to see
more cells.

--

Hope this helps,

Chris Roth
Visio MVP
 
B

Bubily

Thanks Its worked... Iwas in need of giving protection to shapes from
selection..Thanks again
 

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