Have a look at this code, it might give you an idea of how to get started:
public class UserControl : Control
{
private TextBox textBox1;
public UserControl()
{
textBox1 = new System.Windows.Forms.TextBox();
textBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(textBox1_KeyPress);
}
public delegate void CustomKeyPressEventHandler(object sender, System.Windows.Forms.KeyPressEventArgs e);
public event CustomKeyPressEventHandler OnCustomKeyPress;
private void textBox1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
if (OnCustomKeyPress != null)
OnCustomKeyPress(sender, e);
}
}