[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Change picture in a Image.

Posted on 1998-04-10
3
Medium Priority
?
160 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 200 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month20 days, 14 hours left to enroll

810 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