I tried the solutions posted above, and they did not work for me. =( Following that basic idea, though (thanks to above), I arrived here, and this seems to work (a little cleaner too). (running on Windows Server 2012 R2)
public class MyLabel : System.Windows.Forms.Label
{
private const int WM_LBUTTONDBLCLK = 0x203;
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_LBUTTONDBLCLK)
{
string sSaved = Clipboard.GetText();
System.Drawing.Image iSaved = Clipboard.GetImage();
base.WndProc(ref m);
if (iSaved != null) Clipboard.SetImage(iSaved);
if (!string.IsNullOrEmpty(sSaved)) Clipboard.SetText(sSaved);
}
else
{
base.WndProc(ref m);
}
}
}
Some extra effort would have to be invested to preserve things like copied Excel fields and the like, although the principle would be the same. As mentioned, you could iterate over the clipboard for all available formats (or the ones you care about), and stuff those values into a Dictionary object, and then restore them afterwords. Text and pics covers it for me, in this case.
One worthwhile (and cautionary) link to see on this subject is here:
How do I backup and restore the system clipboard in C#?