2011-04-15 68 views
0

从来就得到了一个全屏幕应用程序启动巫其他应用程序和等待,直到它已关闭,当它检测到,第一个应用程序被再次启动全sceen与此源代码:等待最小化

Dim LastSlash As Integer = App.LastIndexOf("\") 
Dim MyAppPath As String = App.Substring(0, LastSlash) 
Dim MyAppName As String = App.Substring(LastSlash, App.Length - LastSlash - 1) 
Dim sysFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.System) 
Dim pInfo As New ProcessStartInfo() 
pInfo.FileName = App 
Dim p As Process = Process.Start(pInfo) 
p.WaitForInputIdle() 
p.WaitForExit() 

问题是,如果我通过这种方式启动Skype,当用户点击X来关闭窗口时,应用程序永远不会关闭,它最小化为系统尝试...所以第一个应用程序永远不会满再次屏幕。

没有人知道我该怎么做?

在此先感谢

回答