C# 中实现屏蔽Ctrl+c的方法

主要实现方法为重写WndProc

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

  

posted @ 2018-05-07 15:47  水泽  阅读(629)  评论(0编辑  收藏  举报