Im writing a new plugin based app. This loads assemblies in their own app domains and displays the specified main forms within each via Application.Run(pluginForm). I set the main form in the loader app as the parent of each pluginForm before calling Application.Run(pluginForm) inside the app domain. Hence when the pluginForm shows it always gets displayed in front of the mainForm of the loader app.
My problem is when a user clicks for the first time on the pluginForm (child form), it looses focus and the mainForm (loader app's form) gets focus. (However the pluginForm stays in front) Hence the user ends up having to click twice to get the pluginForm to focus for the first time.
This is pretty annoying. How can I fix this?