本文介绍了处理waitforexit不等待资源管理器关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在尝试打开W​​indows资源管理器,然后等待用户关闭此应用程序,然后再继续我的程序。



该程序与记事本一样,但不是资源管理器。



谢谢



我尝试过:



Hi,

I am trying to open Windows Explorer and then wait for the user to close this application, before continuing with my program.

The program works as intended with Notepad, but not Explorer.

Thanks

What I have tried:

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

推荐答案


这篇关于处理waitforexit不等待资源管理器关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 19:14