Solved

Change picture in a Image.

Posted on 1998-04-10
3
149 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

840 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