473,322 Members | 1,671 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,322 software developers and data experts.

Get processes list problem (win 2000)

Hi
I am trying to get the processes list from using the code attached.
In win xp it works great but in win 2000 i get only one process the idle
Any Ideas ?
The Code :

Dim Vec As System.Diagnostics.Process()
Dim V As Object = Diagnostics.Process.GetProcesses.GetEnumerator

Vec = Diagnostics.Process.GetProcesses
For Each V In Diagnostics.Process.GetProcesses
ListBox1.Items.Add(CType(V, Diagnostics.Process).ProcessName)
Next
--
Thank For The Help
Eran
--
Thank For The Help
Eran
Nov 21 '05 #1
4 1463
' Import
' -------

Imports System.Diagnostics

' Declaration
' ------------

Dim p As Process

' Behind a button:
' ----------------

ListBox1.BeginUpdate()
ListBox1.Items.Clear()

For Each p In Process.GetProcesses
ListBox1.Items.Add(p.ProcessName)
Next

ListBox1.EndUpdate()

Crouchie1998
BA (HONS) MCP MCSE
Official Microsoft Beta Tester
Nov 21 '05 #2
"Eran AMiel" <Er*******@discussions.microsoft.com> schrieb:
I am trying to get the processes list from using the code attached.
In win xp it works great but in win 2000 i get only one process the idle
Any Ideas ?
The Code :

Dim Vec As System.Diagnostics.Process()
Dim V As Object = Diagnostics.Process.GetProcesses.GetEnumerator

Vec = Diagnostics.Process.GetProcesses
For Each V In Diagnostics.Process.GetProcesses
ListBox1.Items.Add(CType(V,
Diagnostics.Process).ProcessName)
Next


I doubt that this code works on Windows XP. Try this instead:

\\\
Imports System.Diagnostics
..
..
..
For Each p As Process In Process.GetProcesses()
Me.ListBox1.Items.Add(p.ProcessName)
Next p
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3
You duplicated my code Herfried.

Crouchie1998
BA (HONS) MCP MCSE
Official Microsoft Beta Tester
Nov 21 '05 #4
"Crouchie1998" <cr**********@spamcop.net> schrieb:
You duplicated my code Herfried.


Sorry, I don't see any message of you in this thread -- my OE deleted some
messages because they are not available on the server any more (although
they actually are...), maybe your message was one of them.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #5

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

Similar topics

1
by: Andrei | last post by:
Hi, I'm using: import win32pdh junk, instances = win32pdh.EnumObjectItem(None,None,"Process",win32pdh.PERF_DETAIL_WIZARD) print instances to get a list of the running process on my PC....
0
by: David L. Jessup | last post by:
Hi there: I am trying to write a program to monitor certain processes on a Windows NT 4.0 box without me needing to be logged in. I have successfully created a python program that performs this...
5
by: Roger | last post by:
I would like to get a list of running processes on a remote machine. How is this possible via VB.Net? Is it possible? Can someone point me in the right direction. thanks, rog
4
by: Scott Dillard | last post by:
I have recently been provided with a new laptop. The old one ran Win 2000 with Access 2000 and the new one runs Win XP with Access 2000. When I try to run some of my modules in my old databases on...
3
by: Geir Baardsen | last post by:
Hi! Having an access 2000 mdb with win 2000 have caused some funny problems for me. I can no longer change item in the "frmOrderDetails" (sub form of frmOrders) and have the fields 'Price' and...
2
by: Stu | last post by:
Hi, I have an asp.net page that lists all running processes on the server using the script below: Dim p As Process For Each p In Process.GetProcesses sb.Append(p.ProcessName)...
1
by: Eran AMiel | last post by:
Hi I am trying to get the processes list from using the code attached. In win xp it works great but in win 2000 i get only one process the idle Any Ideas ? The Code : Dim Vec As...
8
by: RICHARD BROMBERG | last post by:
I just set up a Win XP Home Edition computer. My old computer has Windows 2000 Professional Edition and had office 2000 Pro installed (Includes Access 2000). I installed Office 2000 on my XP...
1
by: | last post by:
Hi! I'm running a Python program on M$ Windows 2000 as a test monitor. The program should close various processes, mostly "Application error"-windows, as they are created. This works fine until...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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.