Solved

Change picture in a Image.

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

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

867 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