473,748 Members | 2,231 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6529
See System.Diagnost ics.Processes

"sneffe" <an*******@disc ussions.microso ft.com> wrote in message
news:E5******** *************** ***********@mic rosoft.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.Diagnost ics.Processes

"sneffe" <an*******@disc ussions.microso ft.com> wrote in message
news:E5******** *************** ***********@mic rosoft.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.GetProc esses()
' Iterate through the process array.
For Each myProcess in myProcesses
Console.WriteLi ne(myProcess.Pr ocessName)
Next

// C#
Process[] myProcesses = Process.GetProc esses();
foreach(Process myProcess in myProcesses)
{
Console.WriteLi ne(myProcess.Pr ocessName);
}
"sneffe" <an*******@disc ussions.microso ft.com> wrote in message
news:92******** *************** ***********@mic rosoft.com...
Processes is no a member of System.Dianosti cs, 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.GetProc esses()
' Iterate through the process array.
For Each myProcess in myProcesses
Console.WriteLi ne(myProcess.Pr ocessName)
Next

// C#
Process[] myProcesses = Process.GetProc esses();
foreach(Process myProcess in myProcesses)
{
Console.WriteLi ne(myProcess.Pr ocessName);
}
"sneffe" <an*******@disc ussions.microso ft.com> wrote in message
news:92******** *************** ***********@mic rosoft.com...
Processes is no a member of System.Dianosti cs, 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
1576
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
4186
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 search for a Window handle of an execute file?
9
1619
by: Scott Meddows | last post by:
How can I tell if my program is already running in memory? Code is appreciated. Thanks
4
821
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 to do this in vb.net. Does anybody have a piece of code that can help me? Thanks
8
2539
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 application picks up and parses the 2.0 web.config. It is complaining about the connectionstrings node. If I comment out that node the applications both run. I have tried running the 1.1 application under 2.0 but there are some controls used in...
1
1754
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 about 150,000 lines of C#. I've only just converted this to VS2005 project but am frustrated with the following: - VS2005 insists on compiling all projects when I press F5 to run an application even though no code has changed in the other...
11
4358
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 thought django might be a good way, but I can not seem to get an answer on that board. I would like to put together a CRUD grid with editable/deletable/
0
1284
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. Yes, its 16 bit and still running for many clients (We're working on the new version.). We run WOWExe, NTVDM and a NWAdministrator application which allows workgrouped Nodes to access a central db. I had a client who could not connect to the DB. ...
1
1705
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 Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); // <-- crashes here #1 2. SqlConnection con = new SqlConnection("Persist Security Info=False;server=MyServer\\MyInstance;database=MyDataBase;Connect
0
2587
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 and this solved the problem.
0
8979
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
9522
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...
1
9307
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9225
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...
1
6790
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6069
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
4860
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3296
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
2773
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.