• Sign in to Neowin Faster!

    Create an account on Neowin to contribute and support the site.

  • 0
Sign in to follow this  

Printing memory usage information in textbox

Question

deeptech    0

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

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0
+virtorio    3,204

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

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.