V
vidalsasoon
I have a form that declares new form and both are shown. When my parent
form has focus it handles events correctly using this function:
protected override void OnKeyDown(System.Windows.Forms.KeyEventArgs e)
{
switch(e.KeyCode)
{
case Keys.Escape:
this.Close();
break;
case Keys.P:
MessageBox.Show("debug");
p.LastName = "test";
break;
//default:
// break;
}
}
when I use this function from my child form, nothing happens (i thought
it would automatically be called just as the parent form did).
What am i missing?
form has focus it handles events correctly using this function:
protected override void OnKeyDown(System.Windows.Forms.KeyEventArgs e)
{
switch(e.KeyCode)
{
case Keys.Escape:
this.Close();
break;
case Keys.P:
MessageBox.Show("debug");
p.LastName = "test";
break;
//default:
// break;
}
}
when I use this function from my child form, nothing happens (i thought
it would automatically be called just as the parent form did).
What am i missing?