I am displaying a new Form from one process by passing the Show method the handle of a Form created in another process. I only want this new Form to display above the passed Form, like a MessageBox.
However, this newly launched Form appears above other application windows, despite:
- Setting Process.WindowStyle.Hidden to the Form-displaying process
- Overriding the ShowWithoutActivation and CreateParams properties of the Form.
- Making sure Form.TopMost is not true
I have checked that the window handle is valid from the second process. Focus is not stolen, however.
Process A:
Pass (Form) window handle to a new Process B via the command line
Process B:
Display a new Form using Form.Show(anotherProcessWindowHandle)