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);
}
}

  

原文地址:https://www.cnblogs.com/shuize/p/9003124.html