|
-
Oct 10th, 2000, 07:30 AM
#1
Thread Starter
Hyperactive Member
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.
-
Oct 10th, 2000, 07:34 AM
#2
Frenzied Member
I think the VB runtimes make tha app a lot bigger, and what's your app doing? You have a lot of variables?
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Oct 10th, 2000, 08:40 AM
#3
Thread Starter
Hyperactive Member
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.
-
Oct 10th, 2000, 08:43 AM
#4
Fanatic Member
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.
-
Oct 10th, 2000, 10:16 AM
#5
Thread Starter
Hyperactive Member
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.
-
Oct 10th, 2000, 10:17 AM
#6
Fanatic Member
How big is the picture box?
-
Oct 10th, 2000, 01:10 PM
#7
Frenzied Member
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++.
-
Oct 11th, 2000, 08:37 AM
#8
Thread Starter
Hyperactive Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|