473,385 Members | 1,356 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,385 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 11625
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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?
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...

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.