屏蔽Ctrl+C

重写 WndProc
public class MyTextBox : TextBox
{
public const int WM_COPY = 0x301;
public const int WM_CUT = 0x300;
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_COPY || m.Msg == WM_CUT) return;//不处理
base.WndProc(ref m);
}
}

 

 

 

Clipboard.SetDataObject(null);

 

posted @ 2010-10-27 02:21  把爱延续  阅读(357)  评论(0编辑  收藏  举报