article

Reduce Frx and Exe file size

Email
Submitted on: 1/24/2015 7:31:00 PM
By: Lefteris Eleftheriades (from psc cd)  
Level: Advanced
User Rating: By 10 Users
Compatibility: VB 5.0, VB 6.0
Views: 795
 
     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

 
				

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.


Other 28 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this article (in the Advanced category)?
(The article with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular article, please click here instead.)
 

To post feedback, first please login.