using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace _04TextBox { public partia
基于Window消息实现 class TextBoxExt:TextBox { private const int WM_RBUTTONDOWN = 0x0204; private const int WM_CHAR = 0x0102; protected override void WndProc(ref Message m) { switch (m.Msg) { case WM_RBUTTONDOWN: return;//屏蔽默认右键菜单 break; case WM_CHAR: int n