Hi,
You can use such approach:
1. Get Process class instance returned by Process.Start
2. Query Process.MainWindowHandle
3. Call unmanaged Win32 API function "ShowWindow" or "SwitchToThisWindow"
--
Andrew Gnenny
pulsar2003@/no-spam/email.ru (Please remove /no-spam/ for reply)
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
"Bsiang Tan" <tb*********@hotmail.com> wrote in message
news:OV**************@TK2MSFTNGP10.phx.gbl...
Is there any way to activate or bring the process to front ?
For example, my application will run the windows calculator. After certain
process, I will need to activate the calculator...
I know how to runthe windows calculator..
is Process.Start("calc.exe")
but when I wish to activate the it, I have no idea..
I know there is a function AppActivate( ) in VB..
is there any equivalent function in C# ?
Thank a lot ~
Best regard,
Bsiang