Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows Forms
  4. WinForms NIC Performance Counter

WinForms NIC Performance Counter

Scheduled Pinned Locked Moved Windows Forms
csharpwpfwinformsperformancehelp
5 Posts 2 Posters 14 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 13773662
    wrote on last edited by
    #1

    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!

    Richard DeemingR 1 Reply Last reply
    0
    • U User 13773662

      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!

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      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

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      U 1 Reply Last reply
      0
      • Richard DeemingR Richard Deeming

        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

        U Offline
        U Offline
        User 13773662
        wrote on last edited by
        #3

        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.

        Richard DeemingR 1 Reply Last reply
        0
        • U User 13773662

          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.

          Richard DeemingR Offline
          Richard DeemingR Offline
          Richard Deeming
          wrote on last edited by
          #4

          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

          "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

          U 1 Reply Last reply
          0
          • Richard DeemingR Richard Deeming

            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

            U Offline
            U Offline
            User 13773662
            wrote on last edited by
            #5

            Ok, thanks for the info, I will research it. Still looking for an answer to my question though.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups