david burke

david burke

  • NA
  • 3
  • 0

Keyboard control in multiple window forms

May 7 2008 7:24 PM
Hi, I have a program that has multiple window forms.  A parent form that needs to be manipulated rarely and a child form that needs to be manipulated often.  I also need the code that controls the parent form to wait until the child form does something.  I do so with this loop


while(arrPlayer[n].cont == false)
{
    Application.DoEvents();
    Thread.Sleep(1000);
}


The child is displayed using a show() since showDialog() would hold up the execution of code under it.  This allows the parent form to do things, while waiting for the child to finish it's job(at which point arrPlayer[n].cont becomes true).  Here's my problem, the child form isn't taking any keyboard input.  I should be able to navigate it's buttons using the arrow keys but i cannot.  The mouse works however, but this is extremely annoying to use a mouse to click on buttons.  Does anyone have a suggestion on how to fix this?

Thanks!

Answers (2)