asdfasfd
asdfasfd

Reputation: 291

Can't get a form to show in front of another

On my main form I call

        WaitingForm.Show()
        WaitingForm.Focus()
        WaitingForm.Select()

and then run work in a backgroundworker. For some reason that form never opens in front of my main form though. How can I get it to show infront?

Upvotes: 0

Views: 40

Answers (2)

Sievajet
Sievajet

Reputation: 3513

Use the Form.Owner property to make a form owned by another form. Assign its Owner property a reference to the form that will be the owner. For example:

WaitingForm.Show(Me)

Upvotes: 1

Zulluh
Zulluh

Reputation: 71

I assume you have instantialized this New Form if it was created programatically. In which case you can use the Topmost Property of the Form.

Hope that helps.

Upvotes: 1

Related Questions