WinForms NIC Performance Counter
-
Hello all, new here. I am trying to learn how to build a Windows GUI program for a few .exe and cmd scripts I have. I started out with WPF but learned I cannot use performance counters with it so I moved on to WinForms. There are alot of video's out there on creating a WinForm for CPU and RAM but I need to create one for a specific NIC with receive bytes, more specifically I would like it to read in Mb. Any help would be greatly appreciated!
-
Hello all, new here. I am trying to learn how to build a Windows GUI program for a few .exe and cmd scripts I have. I started out with WPF but learned I cannot use performance counters with it so I moved on to WinForms. There are alot of video's out there on creating a WinForm for CPU and RAM but I need to create one for a specific NIC with receive bytes, more specifically I would like it to read in Mb. Any help would be greatly appreciated!
Member 13805869 wrote:
I started out with WPF but learned I cannot use performance counters with it
That comment makes no sense. The PerformanceCounter[^] class is not tied to any UI framework. You can use it from WPF, Windows Forms, or console applications. You can even use it from ASP.NET to read the server's performance counters. What makes you think you can't use it with WPF?
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
Member 13805869 wrote:
I started out with WPF but learned I cannot use performance counters with it
That comment makes no sense. The PerformanceCounter[^] class is not tied to any UI framework. You can use it from WPF, Windows Forms, or console applications. You can even use it from ASP.NET to read the server's performance counters. What makes you think you can't use it with WPF?
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Just about everything in the toolbox in VS community 2015 is grayed out except all the WPF stuff when i select a WPF project. I have looked up the issues on google and tried everything that I could find to see if I could fix it. Nothing helped, it all came down to the performance counter was not available when I selected a new WPF project but was available when I selected a WinForms project.
-
Just about everything in the toolbox in VS community 2015 is grayed out except all the WPF stuff when i select a WPF project. I have looked up the issues on google and tried everything that I could find to see if I could fix it. Nothing helped, it all came down to the performance counter was not available when I selected a new WPF project but was available when I selected a WinForms project.
That just means you can't drag it onto the window; you have to create it via code instead. It might be easier to use in Windows Forms, but that doesn't mean you can't use it in WPF. :)
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
That just means you can't drag it onto the window; you have to create it via code instead. It might be easier to use in Windows Forms, but that doesn't mean you can't use it in WPF. :)
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Ok, thanks for the info, I will research it. Still looking for an answer to my question though.