When you click on the dialog in your first app(App1) you are activating this app and therefor the second app will loose it's status.
One way to bring your dialog in front of your second app is to call the dialog from the second app.
Call your second app from your first app and get the handler ID.
Open your dialog in the first app as Modal i.e. ShowDialog().
then call the user32.dll to bring in the second app using its handler id as below:
[DllImport("User32.dll", EntryPoint = "SetForegroundWindow")]
private static extern IntPtr SetForegroundWindowNative(IntPtr hWnd);
public IntPtr SetForegroundWindow(IntPtr hWnd)
I hope this helps.