I find the following code is often successful for keeping a new process inactive. It does require that the new process respects the initial window state request from the operating system and not all will do this. Notepad is one that does but e.g. VideoLan media player does not.
Private Sub StartProcess()
Dim psi As New ProcessStartInfo()
psi.FileName = "notepad.exe"
psi.UseShellExecute = True
psi.WindowStyle = ProcessWindowStyle.Minimized
Dim p As New Process()
p.StartInfo = psi
p.Start()
p.WaitForInputIdle()
Me.Activate()
End Sub
Console processes will raise an exception if WaitForIdleInput is called and I've never found a wholly successful method of keeping those in the background. I had one really annoying application which would activate itself at certain points in it's processing cycle and the only way I could stop that driving me crazy was to run it in a separate desktop via SysInternals Desktops.exe.
Alan.