• 0

Printing memory usage information in textbox


Question

I am working on vb.net software. For example, I want to see the memory usage of a program called opera.exe. In the picture I pointed out with red fields. If the memory usage of this program is 21,180, I want to transfer it to the textbox. I want it to say 21180 in the textbox box.

 

 

Is this possible? Can I print a program's memory usage to the textbox box? Please help me. Thank you.

 

 

7B0B1N.png

2 answers to this question

Recommended Posts

  • 0

Yes it's possible. You need to use the Process class to find the process you want, and use the WorkingSet64 property (I think that's the one) to see how much memory it's using. You can also use PerformanceCounter for more accurate values. See links below for reference: 

 

https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.process.getprocesses?view=netframework-4.8

https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.process.workingset64?view=netframework-4.8#System_Diagnostics_Process_WorkingSet64

https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.performancecounter?view=netframework-4.8

  • 0

This topic was automatically locked because it did not receive any replies for a year. If you want to have this topic reopened

  • please contact any staff moderator or
  • report the first post of the topic with the reason why it should be reopened.

Thank you.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • PC gaming market is being killed by the high prices of GPU's and all these smaller LLM's that people are playing with are causing it. That and greed. AMD is still way behind NVIDIA. The number of games that still does not support FRS3 is bad, FRS4 is a even worse, and on the flip side you have to look far and wide to find a game that does not support DLSS (newer games). Then there is power consumption which AMD always lags behind in.
    • Yeah, HDMI 2.1 was a complete scam. It had a lot of impressive improvements over 2.0, but they were basically all optional, so seeing a HDMI 2.1 badge on a box or device meant nothing.
    • Wasn't that issue that they refused to allow the HDMI support being included in an open-sourced format? If I'm remembering that correctly, then it seems like an easy workaround would be to let people choose to either install proprietary precompiled drivers with HDMI support, or open-source drivers that don't include the super-secret HDMI stuff the Forum is so worried about. I know proprietary anything is the antithesis of the FOSS community, but if the HDMI Forum creates legal obstacles to using important hardware features of your devices, then I think offering both options is a reasonable workaround.
    • ethically, vegetables emit red, yellow or neon. Ewww..
    • I'm really hoping they don't remove the drivers from the Microsoft Update Catalog at least. An offline, alternate options is Snappy Driver Installer Origin - https://www.snappy-driver-installer.org/ Recently, to get a Serial Port-USB cable adapter to work correctly (updating an old handheld GPS), I had to downgrade the driver from the 2024 to the 2021 version.
  • Recent Achievements

    • Week One Done
      Helen Shafer earned a badge
      Week One Done
    • First Post
      emptyother earned a badge
      First Post
    • Week One Done
      Crunchy6 earned a badge
      Week One Done
    • One Month Later
      KynanSEIT earned a badge
      One Month Later
    • One Month Later
      gowtham07 earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      665
    2. 2
      ATLien_0
      271
    3. 3
      Michael Scrip
      223
    4. 4
      Steven P.
      167
    5. 5
      +FloatingFatMan
      166
  • Tell a friend

    Love Neowin? Tell a friend!