BringToFront() doesn't work

  • Thread starter Thread starter jabailo
  • Start date Start date
J

jabailo

I launched a form set to an object called Search, from a main form, like
this:


Search.Show();
Search.Activate();
Search.BringToFront();


But the form stays behind the main form.
 
I launched a form set to an object called Search, from a main form, like
this:

Search.Show();
Search.Activate();
Search.BringToFront();

But the form stays behind the main form.

Search.Show() alone works for me. Of course, if I click on the main form the
new form goes behind it as the main form gets focus. Is it possible you're
setting the main form to be always on top or something? Alternatively, how
about Search.Show(this) or Search.ShowDialog(this)?
 
Sean said:
Search.Show() alone works for me. Of course, if I click on the main form the
new form goes behind it as the main form gets focus. Is it possible you're
setting the main form to be always on top or something? Alternatively, how
about Search.Show(this) or Search.ShowDialog(this)?

One thing worked:

Before:

Search.BringToFront();

I put:

this.SendToBack();
 
Back
Top