using System;
using System.Windows.Forms;
namespace ControlLibrary
{
public class AsciiTextBox : TextBox
{
//消息
private int WM_CHAR = 0x0102;
protected override void WndProc(ref Message m)
{
//条件判断
if (m.Msg == WM_CHAR && m.WParam.ToInt32() > 127)
return;
base.WndProc(ref m);
}
}
}