Solved

Streamlining a VB6 application

Posted on 2006-11-22
9
175 Views
Last Modified: 2010-04-30
I have written a simple little API program to trap HotKeys and launch applications.  When compiled the executable is 24K but when running in memory it's over 3Meg.  I can't quite see the reason for the pregnancy.  My question is this, "What is the best way to minimize the overhead of a simple VB program?".  I'm writing this to run in a terminal server environment and I don't really want to hack out 90MB (30 users) if I don't have to.

What do I need to know you guru's??
0
Comment
Question by:sifugreg
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 10

Accepted Solution

by:
Kinger247 earned 25 total points
ID: 17997620
Its not just your application exe thats loaded into memory, its all referenced files too.
Can't be helped, if you need them in your app... they need to be loaded.
0
 
LVL 1

Author Comment

by:sifugreg
ID: 17999838
Guess that was part of the question.  "are there any unnecessary reference files loading".  There are no controls on the form sans a single button.  I'ts just something that remains hidden in memeory and monitors API.  When you compile,  does anything go into the .exe that is not on the form specifically?  Wondering if deselecting anything in Project References would help but now that I go look there isn't much there.  
0
 
LVL 44

Assisted Solution

by:Arthur_Wood
Arthur_Wood earned 25 total points
ID: 18000302
"are there any unnecessary reference files loading".  No, all of the DLLs that load are needed, by the app, or its internal support structure.  That is the basic 'footprint' of a minimal VB 6 application, and there is absolutely NOTHING that you can do to make it any smaller.  That is the internal 'engine' that enaables a VB 6 application to execute, at runtime.

AW
0
 
LVL 29

Assisted Solution

by:nffvrxqgrcfqvvc
nffvrxqgrcfqvvc earned 25 total points
ID: 18000525
3 megs is normal I wouldnt worry to much about that, check the processor usage if its 0-10 than everything is fine if you want my opinion
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 1

Author Comment

by:sifugreg
ID: 18001075
Okay, I guess if all three of you agree, it must be the way it is.  Remember when software came on 360K floppies?
0
 
LVL 10

Expert Comment

by:Kinger247
ID: 18001818
oh yes !  those where the days .. but then,   360k was allot in our eyes then,
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 18002982
I once was on an assignment (many, many moons ago) at the US Army Tank Automotive Command - in Detroit, MI.  That is where the Army conducts all of the Engineering and design testing on Tank designs.  At the time, they had a Prime Mini-computer (anyone here remember Prime, or Data General or even DEC???).  It was one of the LARGEST Prime systems in the world and they had 1 Gigabyte of hard disk storage !!!!!  Back then that was HUGE.  Oh, how times have changed, in a mere 25 years  LOL.

AW
0
 
LVL 10

Expert Comment

by:Kinger247
ID: 18003150
Times have changed huge just in the last 10, I think.

I remember a server bring as big as a waredrobe. With a 2 inch electrical cable stuffed in the side.
0
 
LVL 1

Author Comment

by:sifugreg
ID: 18003169
Definately remember the DEC but how many of you remember the first 10mb drive called the Gorilla Banana I believe it was Or was that a printer for commodore..   Wow, the memory fades but I remember MFM and RLL 30mb drives with their "stiction" problem where you had to smack the crap out of them to get the data to cross.  Back when we had to use debug to low level format a disk.  I believe we all walked uphill in the snow both directions back then too. ;-)

Interesting tidbit, I wen out and found a little program called HoeKey that performs the same functionality my VB program does and it idles around 250K.  Obviously not written in VB!  I may shelf min and use that one.  
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now