Hello,
I have created an application that searches to see if a process is running
and if it is it maximizes it's window.
i.e.
For Each AProcess In AProcesses
If AProcess.StartInfo.WindowStyle <> ProcessWindowStyle.Maximized Then
AProcess.StartInfo.WindowStyle = ProcessWindowStyle.Maximized
ShowWindow(AProcess.MainWindowHandle, 3)
End If
Next
Is there also a way to make the window "BRING TO FRONT" also?
Thanks,
Chuck
Herfried K. Wagner [MVP] - 06 Dec 2004 20:33 GMT
"Charles A. Lackman" <Charles@CreateItSoftware.net> schrieb:
> For Each AProcess In AProcesses
> If AProcess.StartInfo.WindowStyle <> ProcessWindowStyle.Maximized Then
[quoted text clipped - 4 lines]
>
> Is there also a way to make the window "BRING TO FRONT" also?
You can use the 'SetForegroundWindow' function (+ 'MainWindowHandle' as
handle) to do that (for more info, see MSDN and
<URL:http://www.pinvoke.net/>).

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/