屏蔽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);
}
}
{
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);?
轉載于:https://www.cnblogs.com/08shiyan/archive/2010/10/27/1862079.html
總結
- 上一篇: ThinkPad系列笔记本待机恢复后,双
- 下一篇: JQUERY 常用方法汇总