473,394 Members | 1,749 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Activate other process

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
Nov 15 '05 #1
1 11631
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

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: bughunter | last post by:
In version 7.x connect to db activate db db SQL1494W Activate database is successful, however, there is already a connection to the database. works fine - db activated. In 8.x - No!...
10
by: zhou | last post by:
in Visual Basic ,I use Appactivate(AcadApp.caption);
0
by: Ole Hanson | last post by:
Hi What's the best way of activating a sleeping process on my local machine? I have an application (.exe) minimized to a notifyicon in the tasktray. Now - if the user clicks the exe-file again...
5
by: Adda | last post by:
In a Parent mdi form I have a datagrid. I select a record from the grid and then invoke a childmdi form. I add the childmdi to an arraylist to keep track of it. If a user has selected multiple...
5
by: juststarter | last post by:
hi there here is my problem : there is a main form (frmMain) which calls a searchForm (frmSearch). Then i select an item (from the returned ones) and open a third form (frmData). Taking from...
0
by: crangel | last post by:
Hi i´m develop one app multi-document, is a similar MsWord application I have one MDI Form, that lodges several MDIChild, every time that closed one I make a trigger process, but when I...
1
by: romy | last post by:
vb.net How Do I Activate the windows associated program by its extension ? for example: if filename.txt - notepad filename.xls - excel.
1
by: Girish Kanakagiri | last post by:
Hello, I am trying to Debug C++ application developed on Microsoft VC++ 6.0 IDE. In the Windows Task Manager, we have a Tab processes. Here if we right click any process we will get options...
1
by: k lee | last post by:
I want to create a linkButton to activate my hyperlink which will open a new page in a new window. I would like to know how to code the code of activate the hyperlink which I wish to place it in the...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.