473,320 Members | 2,041 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,320 software developers and data experts.

get running apps. name

Hi, im writing a program to keep track of which programs is currently running. I would like to have the caption of running programs displayed in a textbox on my form. I cant seem to find an easy way to do this in vb.net. Does anybody have a piece of code that can help me?

Thanks
Nov 20 '05 #1
4 6484
See System.Diagnostics.Processes

"sneffe" <an*******@discussions.microsoft.com> wrote in message
news:E5**********************************@microsof t.com...
Hi, im writing a program to keep track of which programs is currently running. I would like to have the caption of running programs displayed in a
textbox on my form. I cant seem to find an easy way to do this in vb.net.
Does anybody have a piece of code that can help me??
Thanks

Nov 20 '05 #2
See System.Diagnostics.Processes

"sneffe" <an*******@discussions.microsoft.com> wrote in message
news:E5**********************************@microsof t.com...
Hi, im writing a program to keep track of which programs is currently running. I would like to have the caption of running programs displayed in a
textbox on my form. I cant seem to find an easy way to do this in vb.net.
Does anybody have a piece of code that can help me??
Thanks

Nov 20 '05 #3
Whoops

my bad...

this is straight from the help system.

When working with processes on a system, it is sometimes necessary to view
all processes that are running at a given time. For example, if you want to
create an application that gives you the functionality of stopping
processes, you must first see which processes are running. You could fill a
list box with the process names and select which process to perform any
other actions on.
To view running processes
Declare an empty array of the type Process.
Fill the empty array with the return value from the GetProcesses method.
Iterate through the process array using the indexed value to obtain the
process name of each process in the array and write it to a console.
The following example shows how to call the GetProcesses method of a Process
component to return the process array and writes the ProcessName value to a
console.
' Visual Basic
Dim myProcesses() as Process
Dim myProcess As Process
myProcesses = Process.GetProcesses()
' Iterate through the process array.
For Each myProcess in myProcesses
Console.WriteLine(myProcess.ProcessName)
Next

// C#
Process[] myProcesses = Process.GetProcesses();
foreach(Process myProcess in myProcesses)
{
Console.WriteLine(myProcess.ProcessName);
}
"sneffe" <an*******@discussions.microsoft.com> wrote in message
news:92**********************************@microsof t.com...
Processes is no a member of System.Dianostics, and if i use process

instead i only get the process of my own application not other running at
the same time. I have seen an API function called "GetWindowText", but dont
know how to use it.
Nov 20 '05 #4
Whoops

my bad...

this is straight from the help system.

When working with processes on a system, it is sometimes necessary to view
all processes that are running at a given time. For example, if you want to
create an application that gives you the functionality of stopping
processes, you must first see which processes are running. You could fill a
list box with the process names and select which process to perform any
other actions on.
To view running processes
Declare an empty array of the type Process.
Fill the empty array with the return value from the GetProcesses method.
Iterate through the process array using the indexed value to obtain the
process name of each process in the array and write it to a console.
The following example shows how to call the GetProcesses method of a Process
component to return the process array and writes the ProcessName value to a
console.
' Visual Basic
Dim myProcesses() as Process
Dim myProcess As Process
myProcesses = Process.GetProcesses()
' Iterate through the process array.
For Each myProcess in myProcesses
Console.WriteLine(myProcess.ProcessName)
Next

// C#
Process[] myProcesses = Process.GetProcesses();
foreach(Process myProcess in myProcesses)
{
Console.WriteLine(myProcess.ProcessName);
}
"sneffe" <an*******@discussions.microsoft.com> wrote in message
news:92**********************************@microsof t.com...
Processes is no a member of System.Dianostics, and if i use process

instead i only get the process of my own application not other running at
the same time. I have seen an API function called "GetWindowText", but dont
know how to use it.
Nov 20 '05 #5

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

Similar topics

3
by: Deasun | last post by:
Good morning In vb.net how would one go about checking if the app is already running Need some pointers on this Thank Deasun
3
by: No One | last post by:
I have a C# programme that needs to run some of Windows executable files. I first need to check if that programme is already running, and if it is, simply bring the window to the front. How can I...
9
by: Scott Meddows | last post by:
How can I tell if my program is already running in memory? Code is appreciated. Thanks
4
by: sneffe | last post by:
Hi, im writing a program to keep track of which programs is currently running. I would like to have the caption of running programs displayed in a textbox on my form. I cant seem to find an easy way...
8
by: Nate | last post by:
I am running on Window 2003. I have a website built in ASP.NET 2.0. I need to have a Virtual Directory running an application in 1.1. I have configured each in its own Application Pool. The 1.1...
1
by: Ben Fidge | last post by:
Can anyone shed some light on why compiling and running web-apps is so slow in VS2005. I have a solution with 3 web-apps, 20 or so library projects and several winforms apps. All in all it totals...
11
by: walterbyrd | last post by:
With PHP, libraries, apps, etc. to do basic CRUD are everywhere. Ajax and non-Ajax solutions abound. With Python, finding such library, or apps. seems to be much more difficult to find. I...
0
by: mogenses | last post by:
This is going to be a good one but may be easy for you experts. I have recently joined a tech support dept supporting an application using ACCESS 2.0 DATABASES and I believe written in Fox Pro. ...
1
by: Stefan Pascal | last post by:
Hello. I have a very strange problem on my system with running C# applications from a longer than usual (>127 chars) path. I was able to reproduce the following 2 cases: 1. Socket s = new...
0
by: sillz | last post by:
On Apr 8, 2:00 pm, sillz <beth.sto...@gmail.comwrote: I never could get this to work. The oracle account tested fine. I ended up creating a new account in Windows with the right permissions...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.