ReadOnly Visio page and Drawing control....

P

Padmakar Bhosale

Hello All
I have an application that has Visio Drawing control on each MDI child
form. There are few drawing control page which may be read-only. If user
does any action like resize shapes, move shapes, add/delete shapes etc,
application show messagebox about the page read only. After message box and
I need to undo the changes made by user or accept the changes based on
option selected by user. I have method that get call whenever there is
change within page called "PageChange()". In this method I have messagebox
that ask user to "AcceptChanges".
I try following things but it does not work.

1) Code check the messagebox result and undo the changes. Code is
DrawingControlDocument.Window.Application.Undo(); //No exception but
does not change the stuff.
2) Same code written in the VisioIdal event. But does not work.
3) Code check the messagebox result and undo the changes. Code is
DrawingControlDocument.Window.Application.DoCmd( UnDoContant );
4) After changes if user use menu to undo the changes it works and code is
DrawingControlDocument.Window.Application.Undo();

I really wonder how these thing is happen. Any one has solution, any
suggestions please answer.

Thanks

Padmakar Bhosale
 
M

MrDolphin

This is just a suggestion as I have no experience in this area but I think ... you should try to capture any type of mouse events and if you know that the diagram is read only not allow them to continue with making the changes in the first place instead of trying to undo them after the fact. Again this is just a thought as I have no experience in this area.
 
P

Padmakar Bhosale

Hello
Thanks for you suggestion. I have tried the stuff and find out the better
solution. What i did, put all the shapes into the newly created layer and
lock the layer.

Padmakar Bhosale

MrDolphin said:
This is just a suggestion as I have no experience in this area but I think
.... you should try to capture any type of mouse events and if you know that
the diagram is read only not allow them to continue with making the changes
in the first place instead of trying to undo them after the fact. Again this
is just a thought as I have no experience in this area.
 

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