I have a .net 4 WinForms app. The main screen shows a list of jobs that are either retrieved by polling a WCF service, or manual entry by the user.
The user can also view various forms to do with the jobs, who carries them out, the job location etc.
However when these forms pop up over the main screen, they intermittently vanish behind it. I assume this is because the polling refreshes the main screen’s job list and gives it the focus.
I initially solved this by setting TopMost = true for all the “child” forms, but when I found it even sent InputDialogs to the back, I began to think I was going about it all wrong.
Is there another way to stop the main screen elbowing itself to the front? I have been told not to use MDI for this app, so it’s not an option.
You need to set the Child Forms Owner Property. or when you Show the Form pass in the Parent Form at that Time.
From above Link: