Blurr
Blurr

Reputation: 60

Is there a way to keep all windows in focus within a Windows Forms application?

I have an application that some times requires the user to have two forms open at a time. I have the main 'home' form window, but also a calculator form window. It isn't a normal calculator so I would like the calculator to stay within the one application.

When filling out the main form, the calculator is needed to work out some data to input. Only problem is, when calculator.ShowDialog() is used, the main form loses focus. The calculator is opened to the right of the main window. So ideally, I would have which ever window is clicked, gain focus.

Upvotes: 1

Views: 165

Answers (2)

User81772
User81772

Reputation: 66

Just use form.Show() instead of ShowDialog

Upvotes: 1

Prochu1991
Prochu1991

Reputation: 453

Me thinks that you can add Code line calculator.Activate();

Upvotes: 0

Related Questions