Dear Sir/Madam,

How to measure memory consumption of a VB 6.0's programe?

As a programmer in vb. 6.0, where i have to be conscious for getting less consumption of memory of my program at design time?

Is there any free software to measure memory consumption of a programe?

Please guide me Sir/Madam

Hi P.manidas,
What type of memory you want to read/measure? Do you mean to say Memory used for storing or memory used while running your program?

Thanks

Hi P.manidas,
What type of memory you want to read/measure? Do you mean to say Memory used for storing or memory used while running your program?

Thanks

Dear Kinwang2009,

Here i am asking about 2nd one. How much memory will be consumed at the time of running the programe.

Thank you for your query.

Edited 6 Years Ago by P.manidas: n/a

Time to use your friends (yahoo, google, ask, answers, bing) and search for vb6 ReadProcessMemory or you could use the task manager to see how much your program takes up in memory...

Good Luck

Time to use your friends (yahoo, google, ask, answers, bing) and search for vb6 ReadProcessMemory or you could use the task manager to see how much your program takes up in memory...

Good Luck

Dear vb5prgrmr,

First of all thanks for your reply, vb4prgrmr.

As you have written, i have seen in the Task Manager regarding memory used by the programe. If it shows perfect result, then it's OK.

And what about the precaution to take at design time for less memory consumption by the programe/software? And rest of all i will search with my friend as you have written.

Thank you

Precautions in designtime to consume less memory... (you would watch the vb6.exe memory consumption in debug mode...)

Use control arrays as much as possible.
Don't over crowd forms with controls.
If you can, put as much code into modules and classes as you can as the forms graphical elements take up a lot of memory.
When using data access methods and you have a table with an extreme amount of records, don't use a select * unless you absolutly have to for your program.
When you can unload formname/set formname = nothing to totaly remove it from memory.
And this goes with the one above... Don't use public variables in the forms because if you need access to the information contained within that variable, you have to keep at least part of the form loaded. So put the public variable in a module and that way you will have access to it from everywhere when you need it.
Don't load an excessive amount of graphics into memory (icons, who cares, but pictures like bmp's, jpeg's, and the like, yeah you gotta watch those).
The same thing can be said about files you open up, meaning text files and such that you open with the Open Method.
When you can, use an image control instead of a picturebox control or a label instead of a textbox... i.e. use the lightest weight control you can for the purposes needed at hand...

Good Luck

Edited 6 Years Ago by vb5prgrmr: n/a

Dear vb5prgrmr,

Thank you for your reply with lot more information. It's really help me.

Thank you vary much.

Edited 6 Years Ago by P.manidas: n/a

This question has already been answered. Start a new discussion instead.