我使用下面的代碼開始一個新的進程:如何啓動一個進程,而不會失去焦點
Dim procStartInfo As New ProcessStartInfo
Dim procExecuting As New Process
With procStartInfo
.FileName = "C:\PTL\Bin\xxxxxx.exe"
.WindowStyle = ProcessWindowStyle.Normal
.Arguments = "/POLL:5"
End With
procExecuting = Process.Start(procStartInfo)
但是,當這個叫我從調用它的應用程序失去焦點(即使窗口風格設置爲隱藏),所以如果我在表單上的文本框中鍵入,按鍵會因爲重定向到新應用程序而實際丟失。
有什麼方法可以啓動一個流程並保持焦點?
我真的不希望,雖然隱藏它,我只是不想焦點要去其他應用程序 –