473,671 Members | 2,155 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 11658
Hi,
You can use such approach:
1. Get Process class instance returned by Process.Start
2. Query Process.MainWin dowHandle
3. Call unmanaged Win32 API function "ShowWindow " or "SwitchToThisWi ndow"
--
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*********@ho tmail.com> wrote in message
news:OV******** ******@TK2MSFTN GP10.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
5186
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! WHY??? :-(
10
16486
by: zhou | last post by:
in Visual Basic ,I use Appactivate(AcadApp.caption);
0
1378
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 in the filesystem, this will launch another instance of my exe. This is not desired - I want to activate/open the already running application "behind" the notifyicon. What options do I have for activating this sleeping exe? Note: I do NOT want...
5
1544
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 records from the grid and has multiple childmdi forms open and then re-selects a previously selected record, I want to activate that childmdi form. Suppose the arraylist contains indexes 0,1,2,3,4 (5 childmdi forms). A user re-selects a child...
5
2815
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 there i can either : A. open a fourth form (frmComment) which is just a textbox and a button (and should return the text entered in the textbox into frmData) B. open a word document ,and paste its contents into a richtextbox in frmData The problem...
0
1129
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 close the last Form opened does not complete do it, I was using the Activate of forms to call the process but in my form father not it shoots Activate event when I close the last form child.
1
1173
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
1628
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 like end process, end process tree, Debug ... (so on) The Debug option is currently deActivated. I want to know by what setting I can activate it.
1
2281
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 'onclick' event of the linkButton.
0
8476
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8393
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8914
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8670
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5695
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4224
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2810
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1809
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.