-
Hi,
I've just created a small app in VB 6.0, it's file size is 24KB. There are no extra components added to the application, but when I run the app and check task manager (win2000) it says the the app is using 1896K in memory and 548K in Virual memory... Surely this cant be correct. The program has only 1 form with 1 label and 1 picture box and about 20 lines of code (very small)
Is there any way I can reduce the overhead with VB?
Regards,
Craig.
-
I think the VB runtimes make tha app a lot bigger, and what's your app doing? You have a lot of variables?
-
Its a small utility that shows actual physical memory used.
It contains about 30 variables.
It also contains the code below, do you think this might be making it alot larger?
Code:
Private Declare Sub GlobalMemoryStatus Lib "kernel32" (lpBuffer As MEMORYSTATUS)
Craig.
-
I think the picture box takes a lot of memory. Try to save the contents of it to a .bmp file and check the size.
-
The picture box contains no image, only a line this is created with
Code:
Picture1.Line (0, 0)-((Picture1.ScaleWidth / 100 )), blah
I mean it's only 26K in size on the disk!
Craig.
-
How big is the picture box?
-
The app written in VB will always take at least 1800Kb of mem.The MSVBVMx0.DLL is 1300 KB.Then every app uses the Kernel32.dll and every active x control takes up more mem because more dlls are loaded.
VB is not really a language that has some memory control.If you want your app to take less mem use C++.
-
Thanks for the reponses guys. I understand now why the memory load is so high.. It's funny when you look through task manager, and see that all the other microsoft bits and bobs that are running in memory are all considerably smaller in load than my 26k program.. I'm not suprised why most developers keep away from VB, even microsoft!!
Cheers
Craig.