Ive got a listbox here i add a process but sometimes with its size but for some reason here on framework 4 (framework 3.5 it worked if im right) its not getting the same size as in task manager so anybody who can help will get point :)
And plus im using Windows 7 (Framework 4)
ive got Windows Xp(Framework 3.5)
So whats wrong with the calculation anybody please:@

I need more details. By size (of the listbox) I presume you mean the number of entries in the listbox. What do you mean by "adding a process to the listbox"? And why are you comparing the listbox size to a size in task manager? I also don't know what calculation you are referring to. Can you please try to ask your question more clearly?

Okay i have items in listbox that are running processes now sometimes i like showing the memory too but its not the same as in the task manager its like it adds more im not sure like dtshellhlp in task manger is 1888k and in my app 2360k

Without knowing how you are getting the values to display, my first guess would be that the numbers in task manager are dynamically updated (I think the default is around once a second). The number you display (again, my guess) is a snapshot, and shortly after you grab that number it is no longer consistent with task manager. Windows internals is certainly not my area of expertise so my guess is only semi-educated.

:'(No its not a time problem because mine keeps constant and task manager's also but they not same size:X

Edited 4 Years Ago by VB 2012: n/a

sorry here's the code

KryptonListProcess.Items.Add(p.ProcessName & " - " & (p.PrivateMemorySize64 / 1024).ToString("0,000") & " K")

Edited 4 Years Ago by VB 2012: n/a

I stand by my original guess. Like I said, Windows Internals is not my area. Perhaps someone else can jump in here.

Edited 4 Years Ago by Reverend Jim: n/a

Nvm ill wait for someone else but thanks for your help so far Reverend Jim
You tried that's wat counts:)

My original guess is that the value being displayed is the number retrieved when the snapshot was taken. I have seen many apps in taskmanager where the displayed values change rapidly. I don't know if the numbers you are seeing are like that. Again, if I had to guess I would say that the differences are due to the snapshots from task manager and your app being taken at different times. As I said, I am not a Windows Internals kinda guy so I am only offering a guess.

Now I have a suggestion. Repeatedly spamming me with private messages is not a good idea. Once I post to a thread I get notified when you (or anyone else) posts a reply. The only people who get notified when you add to a post are those people who have already responded. When you post a question, then follow it up with a "please someone" post, nobody sees it if you are the only poster.

That being said, I'm sorry I was not able to be more helpful.

This article has been dead for over six months. Start a new discussion instead.