Solved

bitmaps make my executable huge.

Posted on 1998-09-26
4
138 Views
Last Modified: 2010-04-06
I am writing a program that wil have about 1000 bitmaps throughout it. What is the best way to display the bitmap on each screen without swelling the size of my executable?
Cheers
Mike Ross
0
Comment
Question by:mykyl
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
duke_n earned 100 total points
ID: 1340881
Hi.
you can create those images at runtime and load'em from the needed files:

public
bmp:timage
{ Public declarations }

....

procedure TForm1.Button1Click(Sender: TObject);
begin
bmp:=timage.Create(form1);//or another form
bmp.Parent:=form1;// ----------- // --------
bmp.AutoSize:=true;//here when it created you can also modify //other parameters like bmp.left and bmp.width
bmp.Picture.LoadFromFile('d:\pictures\bitmap.bmp');//or another //bitmap
end;

and dont forget to call bmp.free in Form1.onclose.

0
 
LVL 2

Expert Comment

by:333
ID: 1340882
You can add bitmaps to DLL, not to EXE, or you can use them as separate BMP files, by calling TImage.Picture.LoadFromFile('MyPicture.bmp');
0
 
LVL 2

Expert Comment

by:333
ID: 1340883
Sh*t, duke_n posted answer when i wrote my comment.
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1340884
You can also include them in a Resource file which I think is the best way since no one can exchange your bitmaps....Otherwise if you load the bitmaps from a file someone can change the bitmap and just change the name to be as the previous....

Regards,
Viktor Ivanov
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now