Well, it worked for me... the counter must persist outside the sub, so it must be declared at the form level, and then when you click on a button, run code to read the NextValue....
Anyway, I wrote something that will allow you to find out what categories are available ... its rather crude... there is a Process counter in there....
VB Code:
Dim f As PerformanceCounterCategory Dim g As Int32 Dim t As String Dim r As Array r = System.Diagnostics.PerformanceCounterCategory.GetCategories() For g = 0 To r.GetUpperBound(0) f = (r.GetValue(g)) Console.WriteLine(f.CategoryName()) Next




Reply With Quote