重写 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);

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-08
  • 2022-12-23
  • 2021-12-24
  • 2022-01-27
  • 2022-12-23
  • 2021-06-05
猜你喜欢
  • 2022-01-30
  • 2022-01-08
  • 2021-11-23
  • 2022-12-23
  • 2022-01-30
  • 2021-09-04
相关资源
相似解决方案