Solved

Streamlining a VB6 application

Posted on 2006-11-22
9
177 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
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…

822 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