473,387 Members | 1,687 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,387 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 6491
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: 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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.