Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

bitmaps make my executable huge.

Posted on 1998-09-26
4
Medium Priority
?
145 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
[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
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
duke_n earned 200 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

688 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