Cancel a cut or an undo (ctrl-x, ctrl-z)

S

Stumple

I am trying to keep visio from performing a cut and lifting shapes off the
drawing. I would also like to stop it from doing other operations as well
such as undo.

Could someone tell me how to stop the cut operation from being performed by
visio? I have tried disabling events and changing the selection so that it
cannot access it. Any ideas? Thank you.


Here is my code to see when the operation is being performed:

case (short)VisEventCodes.visEvtCodeEnterScope:
try
{

string[] strings = moreInfo.ToString().Split(new
char[] { ';' });
int code=0;

if (Int32.TryParse(strings[0], out code)){
switch(code){
case (int)VisUICmds.visCmdUFEditCut:

this.OnCut(this, new EventArgs());
this.OnCutOperation=true;

break;
case (int)VisUICmds.visCmdEditUndo:
case (int)VisUICmds.visCmdEditUndoMultiple:

System.Windows.Forms.MessageBox.Show("Undos are unavailable and are likely to
cause errors.");
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