471,338 Members | 1,012 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,338 software developers and data experts.

Get currently used Network Bandwidth with VisualBasic.NET or VJ#

Hi all,
I would like to read the currently used bandwidth using VB.NET or VJ#. I
tried using the PerformanceCounter but this one only displays the
available bandwidth and not the used bandwidth. Can anybody point me to
the solution for this problem?

Thanks in advance, Filip
Jul 21 '05 #1
2 2599
You *might* try with System.Management, something along these lines...

Dim a As New System.Management.ManagementObjectSearcher("SELECT
* FROM Win32_PerfFormattedData_Tcpip_NetworkInterface")
Dim b As System.Management.ManagementObject
For Each b In a.Get
MsgBox(b("Property").ToString)
Next

Being "Property" one of these...

http://msdn.microsoft.com/library/de...kinterface.asp

I have not tested this one though. If it does not work, dig a little
deeper into msdn for the WMI classes to see if you find something that
does. Hope it helps.

S

Jul 21 '05 #2
Hi,
thanks alot. I'll tell you as soon as I tried.

Filip

Samuel Caparros schrieb:
You *might* try with System.Management, something along these lines...

Dim a As New System.Management.ManagementObjectSearcher("SELECT
* FROM Win32_PerfFormattedData_Tcpip_NetworkInterface")
Dim b As System.Management.ManagementObject
For Each b In a.Get
MsgBox(b("Property").ToString)
Next

Being "Property" one of these...

http://msdn.microsoft.com/library/de...kinterface.asp

I have not tested this one though. If it does not work, dig a little
deeper into msdn for the WMI classes to see if you find something that
does. Hope it helps.

S

Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

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.