最小化后台应用程序 [英] minimize an application in background

查看:147
本文介绍了最小化后台应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序通过它打开/启动另一个软件总是在我的应用程序前面,我必须最小化它manualy。



我想要任何应用程序/通过我的应用程序打开的软件应该在后台打开并最小化(无反射)。



使用这样的代码但不起作用。



任何建议或新内容。



I have an appliction through it opening/starting another software which always come front of my application and i have to minimize it manualy.

I want when any application/software open through my applicaion should be open in background and minimize always(no reflection).

using code like this but not working.

Any suggestion or something new.

Diagnostics.Process.Start("path\Notepad.exe")





然后调用以下功能





then calling below functions

FindAndMinimizeWindowByTitle("notepad")
Public Const SW_MINIMIZE As Integer = 6
Public Function ShowWindow(ByVal hWnd As IntPtr, ByVal nCmdShow As Integer) As Integer
End Function

Public Function FindAndMinimizeWindowByTitle(ByVal Title As String) As Boolean

For Each clsProcess As System.Diagnostics.Process In System.Diagnostics.Process.GetProcesses
  If (clsProcess.ProcessName = Title) Then

     ShowWindow(clsProcess.MainWindowHandle, SW_MINIMIZE)

Return True
End If
Next
Return False

 End Function

推荐答案

记事本的开始可能需要几毫秒。在调用最小化函数之前稍等一下。
The start of Notepad may take some milliseconds. Just wait a little before you call your minimize function.


自动最小化并隐藏VB.Net中的表单 [ ^ ]

但你可以这样做这个......

http://go4answers.webhost4life.com/Example/disabling-background-windows-118218 .aspx [ ^ ]


我认为,



您无法相应地控制其他构建exe /应用程序,您需要更改你的

相应的申请。
I think,

You can''t control other build exe/application accordingly, you need to change in your
application accordingly.


这篇关于最小化后台应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆