I'd like to invoke an event from unknown control in code. I'd love to do the following, but the "KeyDown" property is only for adding or removing (+= -=) events, not for invoking...
private void QBDT_KeyDown(object sender, KeyEventArgs e)
{
Control l_oActiveControl = this.ActiveControl;
if (l_oActiveControl is TextBox)
{
TextBox l_tbActive = l_oActiveControl as TextBox;
if (e.KeyCode == Keys.C || e.KeyCode == Keys.Z || e.KeyCode == Keys.X || e.KeyCode == Keys.A)
{
l_oActiveControl.KeyDown(sender, e);
return;
}
}
//Do Something
}
Any ideas? Thanks :)