I think we've all done this one at some point in time.
Here's your problem: "
I created that custom textbox by placing a normal textbox onto the surface of the blank user control"
If you're simply extending a class like this, don't go creating a new user control. Simply create a new class in code view, then specify that it derives from TextBox. Then add into this derived class all the additional code you need for your "codes to filter characters associating with keydown and keyup events of that textbox." etc.
e.g. a simple textbox which has a default background colour of Blue, and an example of overriding keydown events etc
using System.Windows.Forms;
namespace DrummerWriter
{
class Textbox2 : TextBox
{
public Textbox2()
: base()
{
BackColor = System.Drawing.Color.Blue;
}
protected override void OnKeyDown(KeyEventArgs e)
{
base.OnKeyDown(e);
}
}
}
Hope that helps :)