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();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top