以下代码是我尝试打开Windows资源管理器,然后等待用户关闭它,然后继续执行该程序。
这可以使用Notepad.exe但不能使用Exlorer.exe
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim newProc As Diagnostics.Process
'newProc = Diagnostics.Process.Start("Notepad.exe") 'This works
newProc = Diagnostics.Process.Start("Explorer.exe") 'This does not work
newProc.WaitForExit()
MsgBox("Continue Processing")
End Sub
感谢您的帮助