Detect when owned form is brought to front?

  • Thread starter Thread starter JS
  • Start date Start date
J

JS

Sorry about the last post -- I hit Enter by accident...

I have the following code ('this' is a non-MDI Form):

Form form1 = new Form();
form1.Owner = this;
form1.Show()

Form form2 = new Form();
form2.Owner = this;
form2.Show();

The behavior is that form1 and form2 are sort of child forms of 'this'
form. When the above code is executed, form2 is in the front, and I'd
like to check when the user clicks on form1 to bring it to the front.
I guess I was assuming that this was the 'GotFocus' event but this does
not work. Is there a 'ZOrderChange' event, or what is it?

Thanks.
 
Back
Top