• 0

Printing memory usage information in textbox


 Share

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 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.

Link to comment
Share on other sites

This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    No registered users viewing this page.