Hi Mike,
Normally, the cut operation is implemented through invoking both Copy and
Delete operation. You may place these 2 operations in a
DesignerTransaction, then you may cancel the cut operation when user uses
"undo". Sample like this:
private void OnMenuCut(object sender, EventArgs e)
{
IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost));
if (host != null && m_currentSelection != null && m_currentSelection.Count
> 0)
{
using(DesignerTransaction trans = host.CreateTransaction("Cut " +
m_currentSelection.Count + " component(s)"))
{
OnMenuCopy(sender, e);
OnMenuDelete(sender, e);
trans.Commit();
}
}
}
For the copy operation, we may leverage VS.net designer's
IDesignerSerializationService to serialize the selected components into an
object, then wrap the object through DataObject class, at last place it
into clipboard. Sample like this:
private void OnMenuCopy(object sender, EventArgs e)
{
IDesignerSerializationService ds =
(IDesignerSerializationService)GetService(typeof(IDesignerSerializationServi
ce));
if (ds != null)
{
object serializedData = ds.Serialize(m_currentSelection);
DataObject data = new DataObject("ShapeLibraryData", serializedData);
Clipboard.SetDataObject(data, true);
}
}
For the delete operation, we may also loop through the selected components
collection, then use IDesignerHost.DestroyComponent method to delete them.
For more information, please refer to the below article, it contains the
source code for all the function and is a good resource for learning
design-time issue:
".NET Shape Library: A Sample Designer"
http://windowsforms.net/articles/shapedesigner.aspx
======================================================
Please apply my suggestion above and let me know if it helps resolve your
problem.
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.