Solved

Streamlining a VB6 application

Posted on 2006-11-22
9
179 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

740 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