Solved

Change picture in a Image.

Posted on 1998-04-10
3
143 Views
Last Modified: 2010-04-06
I want to change the picture in a Image. This stuff doesn't work:
Image1.Picture:='new.bmp';
Why doesn't that work? And how do I have to do such a job?
Thanx. A Beginning Delphi-developper.
roosiedb@worldaccess.nl
0
Comment
Question by:roosiedb
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
mikepj earned 50 total points
ID: 1361391
Image1.Picture.LoadFromFile('new.bmp');
0
 

Expert Comment

by:sabog7
ID: 1361392
to roosiedb

    try this code

procedure TForm1.FormCreate(Sender: TObject);
begin
filelistbox1.ApplyFilePath('c:\***  ');
end;
{**** name of the directory where your BMP is located}

procedure TForm1.FileListBox1Click(Sender: TObject);
begin
image1.picture.LoadFromFile(filelistbox1.filename);
end;

0
 

Expert Comment

by:sabog7
ID: 1361393
to roosiedb

    try this code

procedure TForm1.FormCreate(Sender: TObject);
begin
filelistbox1.ApplyFilePath('c:\***  ');
end;
{**** name of the directory where your BMP is located}

procedure TForm1.FileListBox1Click(Sender: TObject);
begin
image1.picture.LoadFromFile(filelistbox1.filename);
end;

0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

746 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

12 Experts available now in Live!

Get 1:1 Help Now