Solved

Streamlining a VB6 application

Posted on 2006-11-22
9
181 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
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 
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

Technology Partners: 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!

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month4 days, 11 hours left to enroll

636 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