Tools Links Login

Reduce Frx and Exe file size

Did you that your Frx files and Exe files, may be bigger in size than they were supposed to?
(Note: I have submitted this artical befoure but it got deleted. I don't know how.)
Please Vote

Original Author: Lefteris Eleftheriades

Code

S.O.S
about Frx and Exe file size


In
some cases, the size of FRX and EXE files is higher than it should be.


These cases only
involve forms with picture-box  controls which contain pictures and


These pictures have
been changed at least once (Replaced by a new picture)


 


This is caused because Visual Basic
saves all binary data (Such as pictures) in the


end of the form's FRX file. Now, If
you change a picture-box's picture property to a new picture the old picture
will not be overwritten, and still allocate space in the frx file.


This problem also effects the
compiled EXE
file which saves all the data from the frx file.


 


In a game is was doing I had to
change the Picture of an image control that contained the


Background image many times.


 


Findings:


Frx File size: 1.14 MB


Exe File size: 1.83 MB


 


Then I deleted the Form1.frx file and
set the pictures again.


 


Findings:


Frx File size: 0.340 MB (340KB
only!!!)


Exe File size: 0.412 MB (412 KB
only!!!)


 


Conclusion:


After making a lot of changes in a
program you make, and the changes concern binary data (Pictures, Ole container
data) always delete the FRX files and set the properties from squad.

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 103 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.