开发者

Wait for application to be minimized

I´ve got a Full Screen app witch launches other app and wait until it has been closed, when it detects that, the first application is launched again full sceen with this source code:

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()

The problem is that if I launched skype by this way, when de user clicks on X to close de windows, the app is never closed, it is minimized to system try... so the first app never brings to full screen again.

does anyone know how can I do that?

thanks in advance


Use the sample provided here :

http://pinvoke.net/default.aspx/user32.EnumDesktopWindows

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜